mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: allow to set choices for a nullablechoices field (#2462)
fix #2380
This commit is contained in:
commit
be1fa55e9b
2 changed files with 12 additions and 5 deletions
|
@ -1191,11 +1191,13 @@ Fields.TernaryChoices = class extends Fields.MultiChoice {
|
||||||
|
|
||||||
Fields.NullableChoices = class extends Fields.TernaryChoices {
|
Fields.NullableChoices = class extends Fields.TernaryChoices {
|
||||||
getChoices() {
|
getChoices() {
|
||||||
return [
|
return (
|
||||||
[true, translate('always')],
|
this.properties.choices || [
|
||||||
[false, translate('never')],
|
[true, translate('always')],
|
||||||
['null', translate('hidden')],
|
[false, translate('never')],
|
||||||
]
|
['null', translate('hidden')],
|
||||||
|
]
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -447,6 +447,11 @@ export const SCHEMA = {
|
||||||
label: translate('Display label'),
|
label: translate('Display label'),
|
||||||
inheritable: true,
|
inheritable: true,
|
||||||
default: false,
|
default: false,
|
||||||
|
choices: [
|
||||||
|
[true, translate('always')],
|
||||||
|
[false, translate('never')],
|
||||||
|
['null', translate('on hover')],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
slideshow: {
|
slideshow: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
Loading…
Reference in a new issue