Hello,
With Handsontable-Pro 1.4.1 I’m trying to have my grid visually filtered on load so that users still have the capacity to remove the filter afterwards.
var example1 = document.getElementById(‘example1’);
var hot = new Handsontable(example1, {
data: [{ col: false }, { col: false }, { col: true }],
colHeaders: [‘Col’],
stretchH: ‘all’,
columnSorting: true,
columns: [{ data: “col”, readOnly: true }],
dropdownMenu: [‘filter_by_condition’, ‘filter_by_value’, ‘filter_action_bar’],
filters: true
});
hot.getPlugin(‘filters’).addFormula(0, ‘eq’, [false]);
hot.getPlugin(‘filters’).filter();
With this sample I can see my formula is added in the dropdownMenu but is not applied.
I tried multiple operators, changing the data type to string and setting the column type to numeric or checkbox but nothing gives.
Then I discovered that it works when I set the instructions in a timer (~3000ms) meaning that manual filter action can only apply after some event has been reached.
My question is then on what event is it okay to execute manual filter actions ?
Thanks and regards,
Eric.