Dropdown component: onLazyLoad triggers on every open, and onFilter re-renders with empty search results, clearing typed input #7337
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
There was few issues we noted while using the drop down component
1.The onLazyLoad event triggers every time the dropdown is opened, this means that it will fire api call while opening everytime
2.The filter element in the dropdown cannot be controlled via external state. When an empty array is provided for no results, the component re-renders and the typed input in the search field disappears.
could you please help
Reproducer
https://stackblitz.com/edit/wxgt2m?file=src%2FApp.jsx
System Information
Steps to reproduce the behavior
Click on the drop down , you can see a console message getting printed in the console, this indicates that it fires onLazy event everytime when the drop down is opened , try to type some texts in the search field the component will flixker
Expected behavior
No response
The text was updated successfully, but these errors were encountered: