Browse Source

chore(nc-gui): cleanup text area cell

pull/3801/head
braks 2 years ago
parent
commit
2e07a32bb0
  1. 13
      packages/nc-gui/components/cell/TextArea.vue

13
packages/nc-gui/components/cell/TextArea.vue

@ -1,21 +1,16 @@
<script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core'
import { EditModeInj, computed, inject } from '#imports'
import { EditModeInj, inject, useVModel } from '#imports'
interface Props {
const props = defineProps<{
modelValue?: string | null
}
const { modelValue } = defineProps<Props>()
}>()
const emits = defineEmits(['update:modelValue'])
const editEnabled = inject(EditModeInj)
const vModel = computed({
get: () => modelValue ?? '',
set: (value) => emits('update:modelValue', value),
})
const vModel = useVModel(props, 'modelValue', emits, { defaultValue: '' })
const focus: VNodeRef = (el) => (el as HTMLTextAreaElement)?.focus()
</script>

Loading…
Cancel
Save