-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Clickable search filter options #4618
Conversation
…-suggestion-exit
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@@ -148,7 +149,8 @@ export const Search = ({ | |||
<Tooltip title="Clear search query" arrow> | |||
<IconButton | |||
size="small" | |||
onClick={() => { | |||
onClick={e => { | |||
e.stopPropagation(); // prevent outside click from the lazily added element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
search container ref couldn't see the icon button that is added in a conditional render. As a result the IconButton is not considered to be part of the searchContainerRef. It means that it was considered as a click outside of the searchContainerRef which closes the search. We don't want that so we stop event propagation.
/> | ||
</div> | ||
<SearchSuggestions | ||
onSuggestion={suggestion => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when people click on a suggestion we change the input and auto focus the input
}) => { | ||
const searchContext = getSearchContext(); | ||
|
||
const randomRow = useMemo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was generating combined filter and search hints that returned 0 results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
About the changes
Screen.Recording.2023-09-06.at.12.14.38.mov
Main changes:
Important files
Discussion points