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" 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> </div>
</Transition> </Transition>

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

@ -1,3 +1,3 @@
<template> <template>
<div class="mt-4 mb-2" /> <div />
</template> </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) => { const renderIcon = (column: ColumnType, abstractType: any) => {
if (isPrimaryKey(column)) { if (isPrimaryKey(column)) {
return KeyIcon return KeyIcon
} else if (isSpecificDBType(column)) {
return SpecificDBTypeIcon
} else if (isJSON(column)) { } else if (isJSON(column)) {
return JSONIcon return JSONIcon
} else if (isDate(column, abstractType)) { } else if (isDate(column, abstractType)) {
@ -102,8 +104,6 @@ const renderIcon = (column: ColumnType, abstractType: any) => {
return NumericIcon return NumericIcon
} else if (isString(column, abstractType)) { } else if (isString(column, abstractType)) {
return StringIcon return StringIcon
} else if (isSpecificDBType(column)) {
return SpecificDBTypeIcon
} else { } else {
return GenericIcon return GenericIcon
} }

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

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

Loading…
Cancel
Save