mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] FormItem select as default for args with "choice"
This commit is contained in:
parent
ad656b925f
commit
1007c1ee57
1 changed files with 4 additions and 1 deletions
|
@ -262,8 +262,11 @@ export function formatYunoHostArgument (arg) {
|
||||||
]
|
]
|
||||||
|
|
||||||
// Default type management if no one is filled
|
// Default type management if no one is filled
|
||||||
|
if (arg.choices && arg.choices.length) {
|
||||||
|
arg.type = 'select'
|
||||||
|
}
|
||||||
if (arg.type === undefined) {
|
if (arg.type === undefined) {
|
||||||
arg.type = arg.choices && arg.choices.length ? 'select' : 'string'
|
arg.type = 'string'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search the component bind to the type
|
// Search the component bind to the type
|
||||||
|
|
Loading…
Add table
Reference in a new issue