fix: resolve search dropdown unable to reopen in same session #651
+78
−29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes issue #650 where the framework and library dropdown menus in the search modal could only be opened once per search session.
What Changed
modal={true}prop from Dropdown component that was blocking re-opensonInteractOutsidehandlerCloses #650
Testing
Technical Details
Root Cause
The
modal={true}prop in Radix Dropdown creates a modal context that blocks interactions with elements outside the dropdown, preventing proper state management for reopening.Solution
Implemented an intelligent
onInteractOutsidehandler that:[role="listbox"]andbutton[class*="dropdown"]) to intelligently determine boundariesFiles Changed
src/components/Dropdown.tsx: Added onInteractOutside with boundary detectionsrc/components/SearchModal.tsx: Removed modal={true} propWhy This Matters
TanStack Docs search is a critical feature. Users often need to filter by multiple libraries/frameworks in a single search session, making this dropdown reopening capability essential for a smooth user experience.