services should come first
This commit is contained in:
1 parent
b5410eea12
commit
484d69a4b5
2 files changed
+5
-5
No files matched your search
@@ -4,7 +4,7 @@ import classNames from "classnames";
|
||||
|
||||
import { resolveIcon } from "./services/item";
|
||||
|
||||
export default function QuickLaunch({bookmarksAndServices, searchString, setSearchString, isOpen, close}) {
|
||||
export default function QuickLaunch({servicesAndBookmarks, searchString, setSearchString, isOpen, close}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const searchField = useRef();
|
||||
@@ -53,13 +53,13 @@ export default function QuickLaunch({bookmarksAndServices, searchString, setSear
|
||||
useEffect(() => {
|
||||
if (searchString.length === 0) setResults([]);
|
||||
else {
|
||||
const newResults = bookmarksAndServices.filter(r => r.name.toLowerCase().includes(searchString));
|
||||
const newResults = servicesAndBookmarks.filter(r => r.name.toLowerCase().includes(searchString));
|
||||
setResults(newResults);
|
||||
if (newResults.length) {
|
||||
setCurrentItemIndex(0);
|
||||
}
|
||||
}
|
||||
}, [searchString, bookmarksAndServices])
|
||||
}, [searchString, servicesAndBookmarks])
|
||||
|
||||
|
||||
const [hidden, setHidden] = useState(true);
|
||||
|
||||
Reference in new issue
Block a user