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

Content Picker search can run less often #18

Closed
johnwatkins0 opened this issue Mar 18, 2021 · 2 comments
Closed

Content Picker search can run less often #18

johnwatkins0 opened this issue Mar 18, 2021 · 2 comments
Assignees

Comments

@johnwatkins0
Copy link
Member

Is your enhancement related to a problem? Please describe.
The search runs every time input changes. While this is generally not a problem, it can be an issue on slow connections, and it is technically possible to type so fast that you reach the limit of the simultaneous requests the browser will allow.

Describe the solution you'd like

No need to debounce. Instead, we can just make sure only one fetch request is running at a time. After a fetch completes, we check whether the search term has changed; if it has, search again. This way we will still make a lot of requests that are never surfaced in the UI as the user types, but it will be fewer requests than what the component does now.

Designs

Describe alternatives you've considered

Debouncing, though as described above, I don't think it's necessary.

Additional context

I'll send a PR for this, unless someone else sees this and wants to try it.

@xavortm
Copy link
Member

xavortm commented Mar 3, 2022

Also probably fixed in #71

@fabiankaegy
Copy link
Member

Closing this as it appears to be fixed as of #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants