diff --git a/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue b/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue index 83c486ab10..80804fb118 100644 --- a/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue +++ b/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue @@ -129,10 +129,6 @@ watch(expandedFormDlg, () => { } }) -watch(filterQueryRef, () => { - filterQueryRef.value?.focus() -}) - onKeyStroke('Escape', () => { vModel.value = false }) @@ -179,6 +175,12 @@ const linkOrUnLink = (rowRef: Record, id: string) => { linkRow(rowRef, parseInt(id)) } } + +watch([filterQueryRef, isDataExist], () => { + if (readOnly.value || isPublic.value ? isDataExist.value : true) { + filterQueryRef.value?.focus() + } +})