From fbbaf0f67d25dddbb946d67351c7a09a8dfde83a Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 16 Aug 2022 11:49:09 +0530 Subject: [PATCH] refactor(gui-v2): reset filter query and page on re-opening list modal Signed-off-by: Pranav C --- .../components/virtual-cell/components/ListItems.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue b/packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue index 25d512da45..241ad11770 100644 --- a/packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue +++ b/packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue @@ -47,8 +47,10 @@ const linkRow = async (row: Record) => { vModel.value = false } -watch(vModel, () => { - if (vModel.value) { +watch(vModel, (nextVal, prevVal) => { + if (nextVal && !prevVal) { + childrenExcludedListPagination.query = '' + childrenExcludedListPagination.page = 1 loadChildrenExcludedList() } })