Closed insertmike closed 1 year ago
I agree, this behavior is inconsistent and we can allow filtering out all points.
As you take a stab at this, please be aware that if (filteredPointsSet.size > 0
was added because filteredPointsSet
is initialized as an empty set. See https://github.com/flekschas/regl-scatterplot/blob/master/src/index.js#L289. We likely have to update filteredPointsSet
in setPoints()
(https://github.com/flekschas/regl-scatterplot/blob/master/src/index.js#L1753) accordingly, otherwise getPoints()
will be broken.
Abstract
filter
event does not allow hiding all points:I don't see this as intended behavior. When user tries to filter by empty array,
regl-scatter
calls theunfilter
event under the hood and this causes inconsistent behavior. If this is intended, at least it should be stated in the library documentation.Proposal
.unfilter
line from the filter handler above.@flekschas I can take lead on this just let me know your thoughts first. And if there is anything else related that I am not aware of, connected to this behavior. It is all about how much time it will cost.