diff --git a/packages/nc-gui-v2/components/dlg/ViewCreate.vue b/packages/nc-gui-v2/components/dlg/ViewCreate.vue index 03ec9dcdfd..fcf18aa3af 100644 --- a/packages/nc-gui-v2/components/dlg/ViewCreate.vue +++ b/packages/nc-gui-v2/components/dlg/ViewCreate.vue @@ -38,6 +38,23 @@ const typeAlias = computed( }[type]), ) +const inputEl = ref() +const form = ref() +watch( + () => modelValue, + (v) => { + if (v) { + generateUniqueTitle(viewList?.value || []) + nextTick(() => { + const el = inputEl?.value?.$el + el?.querySelector('input')?.focus() + el?.querySelector('input')?.select() + form?.value?.validate() + }) + } + }, +) + /* name: 'CreateViewDialog', props: [ 'value', @@ -103,7 +120,7 @@ const typeAlias = computed( {{ $t('activity.createView') }} - -