diff --git a/packages/nc-gui-v2/components/cell/Email.vue b/packages/nc-gui-v2/components/cell/Email.vue index 5e1e1c671d..f743c5d3f5 100644 --- a/packages/nc-gui-v2/components/cell/Email.vue +++ b/packages/nc-gui-v2/components/cell/Email.vue @@ -2,40 +2,31 @@ import { computed } from '#imports' import { isEmail } from '~/utils' -const { modelValue: value } = defineProps() - -const emit = defineEmits(['update:modelValue']) - -const editEnabled = inject('editEnabled') - interface Props { modelValue: string } +interface Emits { + (event: 'update:modelValue', model: string): void +} + +const props = defineProps() + +const emits = defineEmits() + const root = ref() -const localState = computed({ - get: () => value, - set: (val) => emit('update:modelValue', val), -}) -const validEmail = computed(() => isEmail(value)) - +const editEnabled = inject('editEnabled') - diff --git a/packages/nc-gui-v2/components/cell/Url.vue b/packages/nc-gui-v2/components/cell/Url.vue index 44690332a1..760f93955a 100644 --- a/packages/nc-gui-v2/components/cell/Url.vue +++ b/packages/nc-gui-v2/components/cell/Url.vue @@ -8,11 +8,14 @@ interface Props { } const { modelValue: value } = defineProps() + const emit = defineEmits(['update:modelValue']) + const column = inject(ColumnInj) + const editEnabled = inject('editEnabled') -const localState = computed({ +const vModel = computed({ get: () => value, set: (val) => { if (!(column && column.meta && column.meta.validate) || isValidURL(val)) { @@ -24,19 +27,16 @@ const localState = computed({ const isValid = computed(() => value && isValidURL(value)) const root = ref() + onMounted(() => { root.value?.focus() }) diff --git a/packages/nc-gui-v2/components/virtual-cell/Formula.vue b/packages/nc-gui-v2/components/virtual-cell/Formula.vue index 1e93f6ba00..ae5e223e24 100644 --- a/packages/nc-gui-v2/components/virtual-cell/Formula.vue +++ b/packages/nc-gui-v2/components/virtual-cell/Formula.vue @@ -35,7 +35,7 @@ const urls = computed(() => replaceUrlsWithLink(result.value))
{{ result }}
-
+
Warning: Formula fields should be configured in the field menu dropdown.