I am attempting to apply/remove a filter to a table on a button click. Applying the filter works correctly. However, on removal, all rows in the table are no longer visible. I assume I am doing something wrong in my JS query. I have tried multiple variations without success. I have also applied via the query and then removed via the filter dropdown with the same results. Thanks:
if (cbDeleteResearch.value) {
var ex = AssignedBatches.filters;
ex.push({columnName:"SubmittedCount", operator:"greaterThan", filterValue:"0" });
AssignedBatches.setFilters(ex,"and");
} else {
var ex2 = AssignedBatches.filters;
var idx = ex2.findIndex(elem => elem.columnName=="SubmittedCount");
ex2.splice(idx,1);
AssignedBatches.setFilters(ex2,"and");
}