Popup Table Search Not Working

Here’s a fix for this that should cover most if not all cases:

when the popup opens loop through the model conditions and deactivate all conditions that are not “inactive” and ARE “originalInactive”. this will deactive all conditions besides for the search box. To deactivate the search box you can deactivate based on a few criteria on the condition:

  1. field is null
  2. subconditions.length > 0
  3. name contains "searchbox"
example:

var reload = false;
var model = skuid.$M(“model-name”);
var conditions = model.conditions;
for (var i = 0; i < conditions.length; i++)
{
var condition = conditions[i];
if (!condition.inactive && condition.originalInactive)
{
model.deactivateCondition(condition);
reload = true;
}
else if (!condition.inactive && !condition.originalInactive)
{
if (condition.field == null && condition.subConditions.length > 0 && condition.name.indexOf(“_searchbox”) != -1)
{
model.deactivateCondition(condition);
reload = true;
}
}
}
if (reload)
model.updateData();