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

Allow local search on paginated async select component #1381

Closed
wants to merge 3 commits into from

Conversation

ciremusyoka
Copy link
Collaborator

closes #1380

Changes included with this PR

  • Allow local search on paginated async select component
  • Fetch all pages data on form load

Checklist

  • tests are included and passing

Copy link
Collaborator

@peterMuriuki peterMuriuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ciremusyoka we need to fetch all the data before attempting to search client side, is that something that is handled here.

@ciremusyoka
Copy link
Collaborator Author

@ciremusyoka we need to fetch all the data before attempting to search client side, is that something that is handled here.

This is handled in the PaginatedAsyncSelect component

@ciremusyoka ciremusyoka force-pushed the update-paginated-select branch from d356af3 to 627c949 Compare May 30, 2024 12:54
@peterMuriuki peterMuriuki self-requested a review May 31, 2024 10:02
Comment on lines 181 to 182
// eslint-disable-next-line @typescript-eslint/no-floating-promises
fetchNextPage();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ciremusyoka how would this behave for an error on next page, does useInfiniteQuery catch that

@ciremusyoka ciremusyoka force-pushed the update-paginated-select branch from 94e31db to 247c0b4 Compare June 6, 2024 19:20
@ciremusyoka ciremusyoka force-pushed the update-paginated-select branch 2 times, most recently from b9aec5e to 6b8d7d8 Compare June 6, 2024 19:48
@ciremusyoka ciremusyoka force-pushed the update-paginated-select branch from 6b8d7d8 to 20510c3 Compare June 6, 2024 19:49
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.

Update PaginatedAsyncSelect component to support local search
2 participants