From 9f45e290e62bd92aea8600c5f4dbde59fee98b2d Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Fri, 23 Aug 2024 20:52:20 +0200 Subject: [PATCH] allow search key name too --- src/renderer/src/components/KeyboardShortcuts.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/KeyboardShortcuts.tsx b/src/renderer/src/components/KeyboardShortcuts.tsx index 1486eff0..4ec2732f 100644 --- a/src/renderer/src/components/KeyboardShortcuts.tsx +++ b/src/renderer/src/components/KeyboardShortcuts.tsx @@ -673,10 +673,11 @@ const KeyboardShortcuts = memo(({ }, []); // eslint-disable-next-line @typescript-eslint/no-explicit-any - const actionEntries = useMemo(() => (Object.entries(actionsMap) as any as [keyof typeof actionsMap, typeof actionsMap[keyof typeof actionsMap]][]).filter(([, { name, category }]) => { + const actionEntries = useMemo(() => (Object.entries(actionsMap) as any as [keyof typeof actionsMap, typeof actionsMap[keyof typeof actionsMap]][]).filter(([key, { name, category }]) => { const searchQueryTrimmed = searchQuery.toLowerCase().trim(); return ( !searchQuery + || key.toLocaleLowerCase().includes(searchQueryTrimmed) || name.toLowerCase().includes(searchQueryTrimmed) || (category != null && category.toLowerCase().includes(searchQueryTrimmed)) );