From 9b07c4763d07fd146987fbe922105feb28746117 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 12 Oct 2022 13:25:18 +0800 Subject: [PATCH] fix(nc-gui): splice local filter when deleting and emit --- packages/nc-gui/composables/useViewFilters.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/composables/useViewFilters.ts b/packages/nc-gui/composables/useViewFilters.ts index 8df90d85e8..2c0cf8c7ac 100644 --- a/packages/nc-gui/composables/useViewFilters.ts +++ b/packages/nc-gui/composables/useViewFilters.ts @@ -129,6 +129,7 @@ export function useViewFilters( if (!autoApply?.value) { filter.status = 'delete' // if auto-apply enabled invoke delete api and remove from array + filters.value.splice(i, 1) } else { try { await $api.dbTableFilter.delete(filter.id) @@ -145,7 +146,7 @@ export function useViewFilters( } else { filters.value.splice(i, 1) } - $e('a:filter:delete') + $e('a:filter:delete', { length: filters.value.length }) } }