This is a migrated thread and some comments may be shown as answers.
String filter behavior
3 Answers 27 Views
This is a migrated thread and some comments may be shown as answers.
Ján
Top achievements
Rank 1
Ján asked on 04 Aug 2017, 10:14 AM

Hello,

we use Kendo UI grid for Angular 2 and we found an issue with default kendo-string-filter. When text is entered into filtering cell the bound filter object is correctly updated,and reset filter button appears, thats fine.

When the text in filter is deleted one would expect filter reset button to disappear and given filter criteria (FilterDescriptor for that column) to be removed from filter object. That is not what happens however. When text is deleted (by backspace for example) he reset button stays visible and bound filter object still contains the FilterDescriptor for that column, just with value being '' (empty string).

3 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 08 Aug 2017, 06:30 AM
Hi Ján,

The discussed behavior is expected, and is caused by the fact that the value of the filtering input in the discussed scenario is in fact an empty string (which is different than a non-existent filter by the given field), as you have mentioned.

You can achieve the desired behavior by applying some custom logic for removing the filter with empty string values from the filter descriptors list in the dataStateChange (or filterChange) event handler, depending on the event that handles filtering in your scenario, e.g.:

http://plnkr.co/edit/4NTjGxmf8LawTUZllZeb?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Ján
Top achievements
Rank 1
answered on 19 Sep 2017, 08:25 AM

Hello,

with the recent updated of kendo-grid the behavior got even stranger. In you post above you claim that

'The discussed behavior is expected, and is caused by the fact that the value of the filtering input in the discussed scenario is in fact an empty string (which is different than a non-existent filter by the given field), as you have mentioned.'

which I was willing to accept.

However I recently updated to latest grid version (1.4.1) and i noticed that now the 'reset filter' button disappears when you delete all text - so it seems that now no filter and empty string filter are the same (as you have no possibility to reset filter is its empty anymore). In such a case also the FilterDescriptor should disappear, but its not...

0
Dimiter Topalov
Telerik team
answered on 21 Sep 2017, 05:44 AM
Hello Ján,

The described issue is fixed in the dev build of the Grid package:

https://github.com/telerik/kendo-angular/issues/873

You can obtain the development builds that contain all latest enhancements and fixes as described in the following section of our documentation:

http://www.telerik.com/kendo-angular-ui/components/installation/development-builds/

I am sorry for any inconvenience the issue might have caused.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Ján
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Ján
Top achievements
Rank 1
Share this question
or