Browse Source

Merge pull request #5193 from nocodb/fix/5182-show-advanced-options-for-specific-db

fix: Column create/edit - show all db options if uidt is SpecificDBType
pull/5221/head
Raju Udava 2 years ago committed by GitHub
parent
commit
0a44d945a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
  2. 2
      packages/nc-gui/components/smartsheet/column/SpecificDBTypeOptions.vue
  3. 4
      packages/nc-gui/components/smartsheet/header/CellIcon.ts
  4. 1
      packages/nc-gui/utils/columnUtils.ts

5
packages/nc-gui/components/smartsheet/column/EditOrAdd.vue

@ -232,7 +232,10 @@ useEventListener('keydown', (e: KeyboardEvent) => {
v-model:value="formState"
/>
<LazySmartsheetColumnAdvancedOptions v-model:value="formState" :advanced-db-options="advancedDbOptions" />
<LazySmartsheetColumnAdvancedOptions
v-model:value="formState"
:advanced-db-options="advancedDbOptions || formState.uidt === UITypes.SpecificDBType"
/>
</div>
</Transition>

2
packages/nc-gui/components/smartsheet/column/SpecificDBTypeOptions.vue

@ -1,3 +1,3 @@
<template>
<div class="mt-4 mb-2" />
<div />
</template>

4
packages/nc-gui/components/smartsheet/header/CellIcon.ts

@ -60,6 +60,8 @@ import DurationIcon from '~icons/mdi/timer-outline'
const renderIcon = (column: ColumnType, abstractType: any) => {
if (isPrimaryKey(column)) {
return KeyIcon
} else if (isSpecificDBType(column)) {
return SpecificDBTypeIcon
} else if (isJSON(column)) {
return JSONIcon
} else if (isDate(column, abstractType)) {
@ -102,8 +104,6 @@ const renderIcon = (column: ColumnType, abstractType: any) => {
return NumericIcon
} else if (isString(column, abstractType)) {
return StringIcon
} else if (isSpecificDBType(column)) {
return SpecificDBTypeIcon
} else {
return GenericIcon
}

1
packages/nc-gui/utils/columnUtils.ts

@ -221,6 +221,7 @@ const isTypableInputColumn = (colOrUidt: ColumnType | UITypes) => {
UITypes.Duration,
UITypes.JSON,
UITypes.URL,
UITypes.SpecificDBType,
].includes(uidt)
}

Loading…
Cancel
Save