mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-21 18:02:35 +01:00
allow search key name too
This commit is contained in:
parent
19224bff2c
commit
9f45e290e6
@ -673,10 +673,11 @@ const KeyboardShortcuts = memo(({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// 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();
|
const searchQueryTrimmed = searchQuery.toLowerCase().trim();
|
||||||
return (
|
return (
|
||||||
!searchQuery
|
!searchQuery
|
||||||
|
|| key.toLocaleLowerCase().includes(searchQueryTrimmed)
|
||||||
|| name.toLowerCase().includes(searchQueryTrimmed)
|
|| name.toLowerCase().includes(searchQueryTrimmed)
|
||||||
|| (category != null && category.toLowerCase().includes(searchQueryTrimmed))
|
|| (category != null && category.toLowerCase().includes(searchQueryTrimmed))
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user