mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 11:32:38 +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)
|
||||
if (properties.type === Array) {
|
||||
properties.handler = 'CheckBoxes'
|
||||
} else if (properties.type === Boolean) {
|
||||
if (properties.nullable) properties.handler = 'NullableChoices'
|
||||
else properties.handler = 'Switch'
|
||||
} else if (properties.choices) {
|
||||
const text_length = properties.choices.reduce(
|
||||
(acc, [_, label]) => acc + label.length,
|
||||
|
@ -145,9 +148,6 @@ export class MutatingForm extends Form {
|
|||
properties.handler = 'Select'
|
||||
properties.selectOptions = properties.choices
|
||||
}
|
||||
} else if (properties.type === Boolean) {
|
||||
if (properties.nullable) properties.handler = 'NullableChoices'
|
||||
else properties.handler = 'Switch'
|
||||
} else if (properties.type === 'Text') {
|
||||
properties.handler = 'Textarea'
|
||||
} else if (properties.type === Number) {
|
||||
|
|
Loading…
Reference in a new issue