Skip to content

Conversation

hestro
Copy link
Member

@hestro hestro commented Sep 16, 2026

This PR adds a functional search bar for filtering books in the BookGrid. The search bar is connected to the query in BookGrid and also uses a debounce.

Changes include:

  • Added SearchBar component
  • Added a useDebounce hook to delay the search query sent to the API, so it only updates once the user has stopped typing, instead of on every keystroke
  • Connected the debounced search value to the query in BookGrid

Note: An empty search currently falls back to a hardcoded default query (subject:fantasy)

@hestro hestro added the enhancement New feature or request label Sep 16, 2026
@hestro hestro self-assigned this Sep 16, 2026
@hestro hestro requested a review from a team as a code owner September 16, 2026 21:28
@hestro hestro linked an issue Sep 16, 2026 that may be closed by this pull request
martakam
martakam previously approved these changes Sep 16, 2026
Copy link
Member

@martakam martakam left a comment

Choose a reason for hiding this comment

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

Very nice! Also good to have debouncing on this immediately - fantastic you remembered this from the group meeting.

martakam
martakam previously approved these changes Sep 16, 2026
@martakam
Copy link
Member

martakam commented Sep 17, 2026

Fixed a merge conflict, but everything should be alright. Need a new PR review from someone that is not me and not Henrik

@martakam martakam requested a review from johahor September 17, 2026 10:35
Copy link
Member

@johahor johahor left a comment

Choose a reason for hiding this comment

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

Tested, worked perfect. Great work on the debounce.

@martakam martakam merged commit 57f8aa1 into main Sep 17, 2026
Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: searching for books
3 participants