From ec25f7e56da4b3c1253ff583eae07f8398528949 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 15 Feb 2024 04:51:25 +0000 Subject: [PATCH] fix(nc-gui): on escape lose link record input focus --- .../virtual-cell/components/ListChildItems.vue | 10 ++++++++-- .../components/virtual-cell/components/ListItems.vue | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue b/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue index 80804fb118..a7ba0c2443 100644 --- a/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue +++ b/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue @@ -41,7 +41,7 @@ const injectedColumn = inject(ColumnInj, ref()) const readOnly = inject(ReadonlyInj, ref(false)) -const filterQueryRef = ref() +const filterQueryRef = ref() const { isSharedBase } = storeToRefs(useBase()) @@ -213,7 +213,13 @@ watch([filterQueryRef, isDataExist], () => { class="w-full !sm:rounded-md xs:min-h-8 !xs:rounded-xl" size="small" :bordered="false" - @keydown.capture.stop + @keydown.capture.stop=" + (e) => { + if (e.key === 'Escape') { + filterQueryRef?.blur() + } + } + " @change="childrenListPagination.page = 1" > diff --git a/packages/nc-gui/components/virtual-cell/components/ListItems.vue b/packages/nc-gui/components/virtual-cell/components/ListItems.vue index 4c55f4a2e2..5baa459194 100644 --- a/packages/nc-gui/components/virtual-cell/components/ListItems.vue +++ b/packages/nc-gui/components/virtual-cell/components/ListItems.vue @@ -27,7 +27,7 @@ const injectedColumn = inject(ColumnInj) const { isSharedBase } = storeToRefs(useBase()) -const filterQueryRef = ref() +const filterQueryRef = ref() const { t } = useI18n() @@ -251,7 +251,13 @@ const onCreatedRecord = (record: any) => { class="w-full !rounded-md nc-excluded-search xs:min-h-8" size="small" :bordered="false" - @keydown.capture.stop + @keydown.capture.stop=" + (e) => { + if (e.key === 'Escape') { + filterQueryRef?.blur() + } + } + " @change="childrenExcludedListPagination.page = 1" >