Mentioned by @aaronbeall at https://forum.handsontable.com/t/what-happened-to-the-filter-plugin-members-documentation/3227
This would help. Something like filtersPlugin.getConditions() which returns a conditions stack that looks like what's passed to afterFilter.
A related request would be a way to set the conditions. Right now the only way is to call addCondition but this only adds a single condition, whereas the "conditions stack" is basically a 2d collection, so to set the conditions (say saved from local storage or a preset) we have to:
filtersPlugin.clearConditions();
for (let i = 0; i < conditionsStack.length; i++) {
const columnConditions = conditionsStack[i];
for (let j = 0; j < columnConditions.conditions.length; j++) {
const condition = columnConditions.conditions[j];
filtersPlugin.addCondition(columnConditions.column, condition.name, condition.args, columnConditions.operation);
}
}
It would be a lot more convenient and intuitive if we could just pass the stack:
filtersPlugin.setConditions(conditionsStack);
Most helpful comment
This would help. Something like
filtersPlugin.getConditions()which returns a conditions stack that looks like what's passed toafterFilter.A related request would be a way to set the conditions. Right now the only way is to call
addConditionbut this only adds a single condition, whereas the "conditions stack" is basically a 2d collection, so to set the conditions (say saved from local storage or a preset) we have to:It would be a lot more convenient and intuitive if we could just pass the stack: