We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 019900f commit 3756978Copy full SHA for 3756978
packages/html-reporter/src/headerView.tsx
@@ -49,11 +49,11 @@ export const GlobalFilterView: React.FC<{
49
setFilterText: (filterText: string) => void,
50
}> = ({ stats, filterText, setFilterText }) => {
51
const searchParams = useSearchParams();
52
+ const query = searchParams.get('q');
53
React.useEffect(() => {
54
// Add an extra space such that users can easily add to query
- const query = searchParams.get('q');
55
setFilterText(query ? `${query.trim()} ` : '');
56
- }, [searchParams.toString(), setFilterText]);
+ }, [query, setFilterText]);
57
58
return (<>
59
<div className='pt-3'>
0 commit comments