Merge pull request #6498 from Budibase/bug/sev2/dont-allow-json-to-multiselect
Don't allow json columns to swap to multi-select
This commit is contained in:
commit
161cb9e85a
|
@ -22,10 +22,8 @@
|
||||||
RelationshipTypes,
|
RelationshipTypes,
|
||||||
ALLOWABLE_STRING_OPTIONS,
|
ALLOWABLE_STRING_OPTIONS,
|
||||||
ALLOWABLE_NUMBER_OPTIONS,
|
ALLOWABLE_NUMBER_OPTIONS,
|
||||||
ALLOWABLE_JSON_OPTIONS,
|
|
||||||
ALLOWABLE_STRING_TYPES,
|
ALLOWABLE_STRING_TYPES,
|
||||||
ALLOWABLE_NUMBER_TYPES,
|
ALLOWABLE_NUMBER_TYPES,
|
||||||
ALLOWABLE_JSON_TYPES,
|
|
||||||
SWITCHABLE_TYPES,
|
SWITCHABLE_TYPES,
|
||||||
} from "constants/backend"
|
} from "constants/backend"
|
||||||
import { getAutoColumnInformation, buildAutoColumn } from "builderStore/utils"
|
import { getAutoColumnInformation, buildAutoColumn } from "builderStore/utils"
|
||||||
|
@ -255,11 +253,6 @@
|
||||||
ALLOWABLE_NUMBER_TYPES.indexOf(field.type) !== -1
|
ALLOWABLE_NUMBER_TYPES.indexOf(field.type) !== -1
|
||||||
) {
|
) {
|
||||||
return ALLOWABLE_NUMBER_OPTIONS
|
return ALLOWABLE_NUMBER_OPTIONS
|
||||||
} else if (
|
|
||||||
originalName &&
|
|
||||||
ALLOWABLE_JSON_TYPES.indexOf(field.type) !== -1
|
|
||||||
) {
|
|
||||||
return ALLOWABLE_JSON_OPTIONS
|
|
||||||
} else if (!external) {
|
} else if (!external) {
|
||||||
return [
|
return [
|
||||||
...Object.values(fieldDefinitions),
|
...Object.values(fieldDefinitions),
|
||||||
|
|
|
@ -158,13 +158,9 @@ export const ALLOWABLE_NUMBER_TYPES = ALLOWABLE_NUMBER_OPTIONS.map(
|
||||||
opt => opt.type
|
opt => opt.type
|
||||||
)
|
)
|
||||||
|
|
||||||
export const ALLOWABLE_JSON_OPTIONS = [FIELDS.JSON, FIELDS.ARRAY]
|
|
||||||
export const ALLOWABLE_JSON_TYPES = ALLOWABLE_JSON_OPTIONS.map(opt => opt.type)
|
|
||||||
|
|
||||||
export const SWITCHABLE_TYPES = [
|
export const SWITCHABLE_TYPES = [
|
||||||
...ALLOWABLE_STRING_TYPES,
|
...ALLOWABLE_STRING_TYPES,
|
||||||
...ALLOWABLE_NUMBER_TYPES,
|
...ALLOWABLE_NUMBER_TYPES,
|
||||||
...ALLOWABLE_JSON_TYPES,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export const IntegrationTypes = {
|
export const IntegrationTypes = {
|
||||||
|
|
Loading…
Reference in New Issue