Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown component: onLazyLoad triggers on every open, and onFilter re-renders with empty search results, clearing typed input #7337

Open
Faiz-exe opened this issue Oct 14, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@Faiz-exe
Copy link

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

System Information:
Processor: Intel Core i7
OS: Windows 11 (64-bit)

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

@Faiz-exe Faiz-exe added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant