-
Notifications
You must be signed in to change notification settings - Fork 5
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
Content search #515
Content search #515
Conversation
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 looks really great! 🎉
I only had one small question which I don't think should impact behavior significantly so I'm going ahead and approving this. Feel free to merge if my question doesn't lead to anything new.
@@ -102,6 +102,8 @@ export const TranscriptSearch = ({ | |||
onClick={() => { | |||
setSearchQuery(null); | |||
if (searchInputRef.current) searchInputRef.current.value = ''; | |||
// Set focus to the search input field | |||
searchInputRef.current.focus(); |
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.
👍
setSearchResults(searchResults); | ||
if (hitCounts?.length > 0) { | ||
setSearchResults({ | ||
...searchResults, | ||
counts: hitCounts, | ||
}); | ||
} |
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.
Why does setSearchResults
get called twice when there are hitCounts? Wouldn't it be simpler to conditionally add hitCounts
to searchResults
and then call setSearchResults
once?
Merging this now so we can test and continue work on it this week. |
Related issue: #502 #508
Please feel free to make changes as needed and then, squash and merge once again it's ready.