mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: fix showLabel wrongly using MultiChoices
Co-authored-by: David Larlet <david@larlet.fr>
This commit is contained in:
parent
c09c2c20ee
commit
53329d19fd
1 changed files with 3 additions and 3 deletions
|
@ -132,6 +132,9 @@ export class MutatingForm extends Form {
|
||||||
const properties = Object.assign({}, defaults)
|
const properties = Object.assign({}, defaults)
|
||||||
if (properties.type === Array) {
|
if (properties.type === Array) {
|
||||||
properties.handler = 'CheckBoxes'
|
properties.handler = 'CheckBoxes'
|
||||||
|
} else if (properties.type === Boolean) {
|
||||||
|
if (properties.nullable) properties.handler = 'NullableChoices'
|
||||||
|
else properties.handler = 'Switch'
|
||||||
} else if (properties.choices) {
|
} else if (properties.choices) {
|
||||||
const text_length = properties.choices.reduce(
|
const text_length = properties.choices.reduce(
|
||||||
(acc, [_, label]) => acc + label.length,
|
(acc, [_, label]) => acc + label.length,
|
||||||
|
@ -145,9 +148,6 @@ export class MutatingForm extends Form {
|
||||||
properties.handler = 'Select'
|
properties.handler = 'Select'
|
||||||
properties.selectOptions = properties.choices
|
properties.selectOptions = properties.choices
|
||||||
}
|
}
|
||||||
} else if (properties.type === Boolean) {
|
|
||||||
if (properties.nullable) properties.handler = 'NullableChoices'
|
|
||||||
else properties.handler = 'Switch'
|
|
||||||
} else if (properties.type === 'Text') {
|
} else if (properties.type === 'Text') {
|
||||||
properties.handler = 'Textarea'
|
properties.handler = 'Textarea'
|
||||||
} else if (properties.type === Number) {
|
} else if (properties.type === Number) {
|
||||||
|
|
Loading…
Reference in a new issue