diff --git a/packages/nc-gui/components/smartsheet/expanded-form/index.vue b/packages/nc-gui/components/smartsheet/expanded-form/index.vue index 5a731b2994..d345b73281 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/index.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/index.vue @@ -122,11 +122,13 @@ if (isKanban.value) { } } -const cellWrapperEl = (wrapperEl: HTMLElement) => { - nextTick(() => { - ;(wrapperEl?.querySelector('input,select,textarea') as HTMLInputElement)?.focus() +const cellWrapperEl = ref() + +onMounted(() => { + setTimeout(() => { + ;(cellWrapperEl.value?.querySelector('input,select,textarea') as HTMLInputElement)?.focus() }) -} +})