From 1007c1ee57332953c0c6ab210bf9b96738188c12 Mon Sep 17 00:00:00 2001 From: axolotle Date: Tue, 15 Nov 2022 12:41:36 +0100 Subject: [PATCH] [fix] FormItem select as default for args with "choice" --- app/src/helpers/yunohostArguments.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/helpers/yunohostArguments.js b/app/src/helpers/yunohostArguments.js index 74ad655d..f092ddea 100644 --- a/app/src/helpers/yunohostArguments.js +++ b/app/src/helpers/yunohostArguments.js @@ -262,8 +262,11 @@ export function formatYunoHostArgument (arg) { ] // Default type management if no one is filled + if (arg.choices && arg.choices.length) { + arg.type = 'select' + } if (arg.type === undefined) { - arg.type = arg.choices && arg.choices.length ? 'select' : 'string' + arg.type = 'string' } // Search the component bind to the type