diff --git a/src/components/Search/SearchPageHeaderInput.tsx b/src/components/Search/SearchPageHeaderInput.tsx index 9394d491244d..c90dcb2330e1 100644 --- a/src/components/Search/SearchPageHeaderInput.tsx +++ b/src/components/Search/SearchPageHeaderInput.tsx @@ -102,6 +102,10 @@ function SearchPageHeaderInput({queryJSON, children}: SearchPageHeaderInputProps } }, [isCannedQuery, isFocused, registerSearchPageInput, unregisterSearchPageInput]); + useEffect(() => { + setTextInputValue(queryText); + }, [queryText]); + useEffect(() => { const substitutionsMap = buildSubstitutionsMap(originalInputQuery, personalDetails, reports, taxRates); setAutocompleteSubstitutions(substitutionsMap);