Skip to content

add debounce to SearchBar #81

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

Merged
merged 3 commits into from
Apr 17, 2025
Merged

add debounce to SearchBar #81

merged 3 commits into from
Apr 17, 2025

Conversation

DawudOsman
Copy link
Contributor

Adds debounced search for titles so results appear without needing to press enter.

@cranci1
Copy link
Owner

cranci1 commented Apr 17, 2025

Wouldn't this be an issue for modules that use APIs with rate limits?

@Ylruhc
Copy link
Contributor

Ylruhc commented Apr 17, 2025

The search api will only be called 0.25 seconds after the user stops typing, any sooner and the timer is reset. The api call rate would be at most 4 requests per second which is within the threshold for most services. If that delay is too low I can change it to 0.3/4 seconds.

@cranci1
Copy link
Owner

cranci1 commented Apr 17, 2025

yeah maybe make it a 0.5s since that the delay change wouldn't be that visible for the user

@DawudOsman
Copy link
Contributor Author

I've changed the delay to 0.5s

@cranci1 cranci1 merged commit ad07457 into cranci1:dev Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants