Browse Source

fix(gui-v2): populate default column name and type

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3005/head
Pranav C 2 years ago
parent
commit
c4b10a4329
  1. 2
      packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue
  2. 1
      packages/nc-gui-v2/composables/useColumnCreateStore.ts

2
packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue

@ -65,7 +65,7 @@ function onCancel() {
// create column meta if it's a new column
watchEffect(() => {
if (!isEdit) {
if (!isEdit?.value) {
generateNewColumnMeta()
}
})

1
packages/nc-gui-v2/composables/useColumnCreateStore.ts

@ -87,7 +87,6 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
// actions
const generateNewColumnMeta = () => {
setAdditionalValidations({})
debugger
formState.value = { meta: {}, ...sqlUi.value.getNewColumn((meta.value?.columns?.length || 0) + 1) }
}

Loading…
Cancel
Save