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

feat(search): Add debounce to search #3703

Merged
merged 1 commit into from
Sep 19, 2024
Merged

feat(search): Add debounce to search #3703

merged 1 commit into from
Sep 19, 2024

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Sep 18, 2024

What does this PR do?

Screen.Recording.2024-09-18.at.14.37.39.mov

Next steps...

  • Offload search to a web worker
  • Better loading UI whilst search debounce is updating
  • Virtualised list for search results (maybe)
  • Search by hitting enter / button (maybe, if performance still not great)

@DafyddLlyr DafyddLlyr changed the title feat: Add debounce to search feat(search): Add debounce to search Sep 18, 2024
@@ -39,6 +42,14 @@ const Search: React.FC = () => {
keys: formik.values.facets,
});

const debouncedSearch = useMemo(
() => debounce((pattern: string) => {
console.debug("Search term: ", pattern)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is intentionally here whilst I continue to work on this.

Copy link

github-actions bot commented Sep 18, 2024

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr requested a review from a team September 18, 2024 13:59
Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Simple & effective !

@DafyddLlyr DafyddLlyr merged commit 43cb10e into main Sep 19, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/search-debounce branch September 19, 2024 10:37
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.

2 participants