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

Pagination Component - Prevent redundant / unintentional fetches #111

Closed
2 tasks done
kevin-pierce opened this issue Jun 20, 2023 · 0 comments · Fixed by #115
Closed
2 tasks done

Pagination Component - Prevent redundant / unintentional fetches #111

kevin-pierce opened this issue Jun 20, 2023 · 0 comments · Fixed by #115
Assignees
Labels
fix involves fixing old code front-end involves front-end work Homepage Features related to the homepage

Comments

@kevin-pierce
Copy link
Contributor

kevin-pierce commented Jun 20, 2023

Summary

In order to throttle the page-search functionality on the homepage, we want to implement some form of debouncing / throttling. In the current implementation, when users search for a large page, such as 400, the following will happen:

  • User types '4' ==> fetch triggered for page 4
  • User types '0' ==> fetch triggered for page 40
  • User types '0' ==> fetch triggered for page 400

As per discussion, the approach of choice entails leveraging onBlur to check for when the user exits the textfield for the page in order to initiate a new fetch.

Goals

  • Trigger a new fetch when the user exits the textfield through onBlur
  • Trigger a new fetch when the user hits the enter key

Implementation

@kevin-pierce kevin-pierce added front-end involves front-end work fix involves fixing old code Homepage Features related to the homepage labels Jun 20, 2023
@kevin-pierce kevin-pierce self-assigned this Jun 20, 2023
@Safewaan Safewaan linked a pull request Jul 12, 2023 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix involves fixing old code front-end involves front-end work Homepage Features related to the homepage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants