Fix stray null error in SearchToolbar
Oops, we don't provide this in the item search page, so check for that!
This commit is contained in:
parent
107696783e
commit
fe5eab5763
1 changed files with 2 additions and 2 deletions
|
@ -47,7 +47,7 @@ export function searchQueryIsEmpty(query) {
|
||||||
function SearchToolbar({
|
function SearchToolbar({
|
||||||
query,
|
query,
|
||||||
searchQueryRef,
|
searchQueryRef,
|
||||||
firstSearchResultRef,
|
firstSearchResultRef = null,
|
||||||
onChange,
|
onChange,
|
||||||
autoFocus,
|
autoFocus,
|
||||||
showItemsLabel = false,
|
showItemsLabel = false,
|
||||||
|
@ -77,7 +77,7 @@ function SearchToolbar({
|
||||||
zoneLabels.sort();
|
zoneLabels.sort();
|
||||||
|
|
||||||
const onMoveFocusDownToResults = (e) => {
|
const onMoveFocusDownToResults = (e) => {
|
||||||
if (firstSearchResultRef.current) {
|
if (firstSearchResultRef && firstSearchResultRef.current) {
|
||||||
firstSearchResultRef.current.focus();
|
firstSearchResultRef.current.focus();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue