Add is empty filter to search / api
[civicrm-core.git] / ang / api4Explorer / Explorer.js
index fb9f5c71ce0d03ccc3c7218e65de3734b5492681..7def6e386f46d516b366f647dd8e797e9cf35a14 100644 (file)
 
       // Add/remove value if operator allows for one
       this.changeClauseOperator = function(clause) {
-        if (_.contains(clause[1], 'NULL')) {
+        if (_.contains(clause[1], 'IS ')) {
           clause.length = 2;
         } else if (clause.length === 2) {
           clause.push('');
             op = field.serialize || dataType === 'Array' ? 'IN' : '=';
           }
           multi = _.includes(['IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'], op);
-          if (op === 'IS NULL' || op === 'IS NOT NULL') {
+          // IS NULL, IS EMPTY, etc.
+          if (_.contains(op, 'IS ')) {
             $el.hide();
             return;
           }