diff --git a/packages/nc-gui/components/cell/Currency.vue b/packages/nc-gui/components/cell/Currency.vue index 04071a9630..2d14a432b9 100644 --- a/packages/nc-gui/components/cell/Currency.vue +++ b/packages/nc-gui/components/cell/Currency.vue @@ -53,7 +53,7 @@ const currency = computed(() => { } }) -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus() diff --git a/packages/nc-gui/components/cell/Decimal.vue b/packages/nc-gui/components/cell/Decimal.vue index 1034b5ee1a..25011a9ad9 100644 --- a/packages/nc-gui/components/cell/Decimal.vue +++ b/packages/nc-gui/components/cell/Decimal.vue @@ -36,7 +36,7 @@ const vModel = computed({ }, }) -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus() diff --git a/packages/nc-gui/components/cell/Duration.vue b/packages/nc-gui/components/cell/Duration.vue index f8783d2aba..7b374e3b37 100644 --- a/packages/nc-gui/components/cell/Duration.vue +++ b/packages/nc-gui/components/cell/Duration.vue @@ -74,7 +74,7 @@ const submitDuration = () => { isEdited.value = false } -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus() diff --git a/packages/nc-gui/components/cell/Email.vue b/packages/nc-gui/components/cell/Email.vue index 45541ecfac..49f742ec31 100644 --- a/packages/nc-gui/components/cell/Email.vue +++ b/packages/nc-gui/components/cell/Email.vue @@ -35,7 +35,7 @@ const vModel = computed({ const validEmail = computed(() => vModel.value && validateEmail(vModel.value)) -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus() diff --git a/packages/nc-gui/components/cell/Float.vue b/packages/nc-gui/components/cell/Float.vue index 13995a58e3..2854ec3189 100644 --- a/packages/nc-gui/components/cell/Float.vue +++ b/packages/nc-gui/components/cell/Float.vue @@ -36,7 +36,7 @@ const vModel = computed({ }, }) -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus() diff --git a/packages/nc-gui/components/cell/Integer.vue b/packages/nc-gui/components/cell/Integer.vue index d539600d87..7e643524d0 100644 --- a/packages/nc-gui/components/cell/Integer.vue +++ b/packages/nc-gui/components/cell/Integer.vue @@ -36,7 +36,7 @@ const vModel = computed({ }, }) -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus() diff --git a/packages/nc-gui/components/cell/Percent.vue b/packages/nc-gui/components/cell/Percent.vue index 574b2d64cc..6bf2e1cdb0 100644 --- a/packages/nc-gui/components/cell/Percent.vue +++ b/packages/nc-gui/components/cell/Percent.vue @@ -27,7 +27,7 @@ const vModel = computed({ }, }) -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus() diff --git a/packages/nc-gui/components/cell/Text.vue b/packages/nc-gui/components/cell/Text.vue index b5ff374cad..6c333f878a 100644 --- a/packages/nc-gui/components/cell/Text.vue +++ b/packages/nc-gui/components/cell/Text.vue @@ -23,7 +23,7 @@ const readonly = inject(ReadonlyInj, ref(false)) const vModel = useVModel(props, 'modelValue', emits) -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus() diff --git a/packages/nc-gui/components/cell/TextArea.vue b/packages/nc-gui/components/cell/TextArea.vue index 36392bf015..7407f03eed 100644 --- a/packages/nc-gui/components/cell/TextArea.vue +++ b/packages/nc-gui/components/cell/TextArea.vue @@ -19,7 +19,7 @@ const { showNull } = useGlobal() const vModel = useVModel(props, 'modelValue', emits, { defaultValue: '' }) -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLTextAreaElement)?.focus() diff --git a/packages/nc-gui/components/cell/Url.vue b/packages/nc-gui/components/cell/Url.vue index 9efa16d4cb..d781d3b28c 100644 --- a/packages/nc-gui/components/cell/Url.vue +++ b/packages/nc-gui/components/cell/Url.vue @@ -63,7 +63,7 @@ const url = computed(() => { const { cellUrlOptions } = useCellUrlConfig(url) -const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! +const isExpandedFormOpen = inject(IsExpandedFormOpenInj)! const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()