From e23c6f43afb42ccf238c66a976589b729cadf5b4 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Wed, 23 Sep 2020 16:04:48 -0400 Subject: [PATCH] selectors: add extended search via Fuse.js --- src/state/selectors.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/state/selectors.ts b/src/state/selectors.ts index 3e26178..81ce041 100644 --- a/src/state/selectors.ts +++ b/src/state/selectors.ts @@ -7,9 +7,10 @@ import { IconEntry, IconCategory } from "../lib"; import { icons } from "../lib/icons"; const fuse = new Fuse(icons, { - keys: [{ name: "name", weight: 2 }, "tags", "categories"], + keys: [{ name: "name", weight: 4 }, "tags", "categories"], threshold: 0.2, // Tweak this to what feels like the right number of results // shouldSort: false, + useExtendedSearch: true, }); export const filteredQueryResultsSelector = selector>({