This is a migrated thread and some comments may be shown as answers.

Kendo Angular Dropdown Server Side Filter, Loading on click the result

3 Answers 720 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Zaw
Top achievements
Rank 1
Veteran
Zaw asked on 12 Apr 2021, 06:37 AM
Hello

I'm trying kendo anguar dropdown list with server side data filtering according to below url to show loading animation. 
https://www.telerik.com/kendo-angular-ui/components/dropdowns/dropdownlist/filtering/

I enter filter text, it show the result then I choose one item in list. 
I note that the loading animation also appear again once I click one item in result list. 
It seems calling the server side again with blank filter text on click the item. 
This issue can reproduce in above URL's Example of loading property. 

Is it intentionally trigger the filter process again on click the item ?

3 Answers, 1 is accepted

Sort by
0
Martin Bechev
Telerik team
answered on 13 Apr 2021, 03:54 PM

Hi Zaw,

Yes. When clicking an item and the loading indicator appears for the second time, then the DropDownList actually is fetching its initial data passing a blank filter. Otherwise, it will show the previously filtered items, instead of the whole collection when opening the popup.

Please check this screencast to see what is happening:

https://screenrec.com/share/zLYv2dJmqO

I hope this sheds some light on this case.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Zaw
Top achievements
Rank 1
Veteran
answered on 13 Apr 2021, 04:19 PM
Hello Martin

Thanks for your reply. 
My dropdown list fetching data from server side with limited top rows because the data amount is big. 
In the case, user filter some text and select one item from result in dropdown.  
After close the dropdown, the filter text reset automatically to blank and load data again with blank filter top rows. 
My problem is when the user open the dropdown again, the current selected item is not include in open dropdown list because filter value is change to blank. 
I think it looks odd for user experience. 

Is there any option to keep the previous filter text and dropdown items on close?

0
Martin Bechev
Telerik team
answered on 15 Apr 2021, 09:10 AM

Hi Zaw,

To persist the filtered data, the developer can handle the open event of the component and manually filter the collection with the last filter value. For that purpose, the value needs to be stored. 

By default, the used filter value is cleared from the filter input once the user selects an option. To persist the value the developer needs to manually set the filter input when the popup is opened.

I updated the second example from our docs with the above suggestion:

https://stackblitz.com/edit/persist-ddl-filter

I hope this helps.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Zaw
Top achievements
Rank 1
Veteran
Answers by
Martin Bechev
Telerik team
Zaw
Top achievements
Rank 1
Veteran
Share this question
or