telerik / kendo-react

Issue tracker - KendoReact http://www.telerik.com/kendo-react-ui/
https://kendo-react-teal.vercel.app
Other
211 stars 39 forks source link

TreeList not operators not filtering as expected #729

Open vladimirivanoviliev opened 4 years ago

vladimirivanoviliev commented 4 years ago

Currently the filterBy method of the TreeList does not support filtering without considering children, however cases requiring using not operators are not working as expected:

We should add option for controlling this in filterBy. image

Xizario commented 4 years ago

In this example "Buffy" is shown because "Gage" is not equal to Buffy" and all Parents of "Gage" are shown in order for it to be visible.

Same will happen if we filter using "Contains" "s" even if Buffy does not contains "s", because it's children do.

Although this is expected behaviour from my point of view, I still see value in option where: All parents in the chain needs to fulfil the query in order to be visible by making the filter more strict.

nstoychev commented 4 years ago

We could add an article showing "How to change the filterBy behavior" or "How to implement your own filterBy function". No need to change current functionality.

vladimirivanoviliev commented 4 years ago

I'm either for option or for making not operators work out of the box with ignoring children of filtered items. For me at least the above example shows why current behavior is not ideal at least.

kdikov82 commented 1 year ago

I kind of agree with both views, although that it is really difficult to determine what will the end user expect while filtering. Applying this for "not" operators only seems logical, because for other operators I would personally expect to get results for the children as well.