mirror of
https://github.com/usememos/memos.git
synced 2025-03-06 10:34:01 +08:00
fix: clear shortcut filter when delete this shortcut (#611)
This commit is contained in:
parent
3472a6db26
commit
f982e83d0a
1 changed files with 4 additions and 0 deletions
|
@ -76,6 +76,10 @@ const ShortcutContainer: React.FC<ShortcutContainerProps> = (props: ShortcutCont
|
|||
if (showConfirmDeleteBtn) {
|
||||
try {
|
||||
await shortcutService.deleteShortcutById(shortcut.id);
|
||||
if (locationService.getState().query?.shortcutId === shortcut.id) {
|
||||
// need clear shortcut filter
|
||||
locationService.setMemoShortcut(undefined);
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toastHelper.error(error.response.data.message);
|
||||
|
|
Loading…
Reference in a new issue