Commit 374f05b8 authored by Robert Knight's avatar Robert Knight

Add missing effect dependencies in StreamSearchInput

This fixes an issue, and corresponding warning in tests, where an effect
would unnecessarily run on every render.

See https://hypothes-is.slack.com/archives/C1M8NH76X/p1581517940185900
parent 42c71af2
......@@ -25,7 +25,7 @@ function StreamSearchInput({ $location, $rootScope }) {
$rootScope.$on('$locationChangeSuccess', () => {
setQuery($location.search().q);
});
});
}, [$location, $rootScope]);
return <SearchInput query={query} onSearch={search} alwaysExpanded={true} />;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment