Browse Source

fix(nc-gui): cellWrapperEl + provide IsExpandedFormOpenInj

pull/5539/head
Wing-Kam Wong 2 years ago
parent
commit
59f5b886ec
  1. 9
      packages/nc-gui/components/smartsheet/expanded-form/index.vue

9
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -5,6 +5,7 @@ import type { Ref } from 'vue'
import { import {
CellClickHookInj, CellClickHookInj,
FieldsInj, FieldsInj,
IsExpandedFormOpenInj,
IsFormInj, IsFormInj,
IsKanbanInj, IsKanbanInj,
MetaInj, MetaInj,
@ -180,10 +181,14 @@ if (isKanban.value) {
} }
} }
const cellWrapperEl = ref<HTMLElement>() provide(IsExpandedFormOpenInj, isExpanded)
const cellWrapperEl = ref()
onMounted(() => { onMounted(() => {
setTimeout(() => (cellWrapperEl.value?.querySelector('input,select,textarea') as HTMLInputElement)?.focus()) setTimeout(() => {
cellWrapperEl.value?.$el?.querySelector('input,select,textarea')?.focus()
}, 300)
}) })
const addNewRow = () => { const addNewRow = () => {

Loading…
Cancel
Save