mirror of
https://github.com/outline/outline.git
synced 2026-11-30 09:00:18 +03:00
fix: Clicking on recent not updating search input
This commit is contained in:
1 parent
c25a824b92
commit
54f1d224bf
1 file changed
+8
@@ -262,6 +262,14 @@ function Search(props: Props) {
|
||||
const results = documents.searchResults(query);
|
||||
const showEmpty = !isLoading && query && results?.length === 0;
|
||||
|
||||
// Set `InputSearch` box value when
|
||||
// `term` changes.
|
||||
React.useEffect(() => {
|
||||
if (searchInputRef.current) {
|
||||
searchInputRef.current.value = term;
|
||||
}
|
||||
}, [term]);
|
||||
|
||||
return (
|
||||
<Scene textTitle={title}>
|
||||
<RegisterKeyDown trigger="Escape" handler={goBack} />
|
||||
|
||||
Reference in new issue
Block a user