This commit is contained in:
thefatcode 2026-02-11 03:03:40 +08:00 committed by GitHub
commit bc108ac9ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -117,6 +117,10 @@ export function MemoFilterProvider({ children }: { children: ReactNode }) {
const setShortcut = useCallback((newShortcut?: string) => {
setShortcutState(newShortcut);
// Clear content search filter when selecting a shortcut (issue #5462)
if (newShortcut !== undefined) {
setFiltersState((prev) => prev.filter((f) => f.factor !== "contentSearch"));
}
}, []);
const hasFilter = useCallback((filter: MemoFilter) => filters.some((f) => getMemoFilterKey(f) === getMemoFilterKey(filter)), [filters]);