Thank you for sharing the details. Now I see it.
To explain why this happens we need to check the examples of the addCondition()
method as it is the one that works under the hood to attach the filters. Reference: https://handsontable.com/docs/api/filters/#addcondition
Starting point
shown
[11, 12, 13, 14],
[21, 22, 23, 24],
[11, 22, 23, 24],
[31, 32, 33, 34],
[41, 42, 43, 44],
[11, 52, 43, 34]
not shown
-
Then we call
filtersPlugin.addCondition(0, 'gt', [11]);
filtersPlugin.filter();
and get
shown
[21, 22, 23, 24],
[31, 32, 33, 34],
[41, 42, 43, 44],
not shown
[11, 12, 13, 14],
[11, 22, 23, 24],
[11, 52, 43, 34]
then we call attach this condition
filtersPlugin.addCondition(1, 'by_value', [[42]]);
filtersPlugin.filter();
and we get
shown
[41, 42, 43, 44]
not shown
[11, 12, 13, 14],
[21, 22, 23, 24],
[11, 22, 23, 24],
[31, 32, 33, 34],
[11, 52, 43, 34]
And then we proceed with None
for column A
which is not explained in the documentation (I will report that on out Github board immediately!). But s we can find it in the Filters API it is a call to the removeConditions()
method with 0
(A
column index). Reference https://handsontable.com/docs/api/filters/#removeconditions
And here is the trap as 42
in the B
column dataset is available only in one single row. So no matter if we use
filtersPlugin.addCondition(0, 'gt', [11]);
filtersPlugin.filter();
still
filtersPlugin.addCondition(1, 'by_value', [[42]]);
filtersPlugin.filter();
blocks the ability for all those rows to show
[11, 12, 13, 14],
[21, 22, 23, 24],
[11, 22, 23, 24],
[31, 32, 33, 34],
[11, 52, 43, 34]
After doing that description I myself found it hard to specify what is happening and I truly feel that this is misleading. I will report the issue with the missing none
description and a request to fill the documentation with some examples on multi-column filters.