From 64ae24facd52a91c492e2a5ca058f43a505a1ff7 Mon Sep 17 00:00:00 2001 From: ljf Date: Tue, 28 Sep 2021 16:48:33 +0200 Subject: [PATCH] [fix] type string with choices need to be displayed with select #1880 --- app/src/helpers/yunohostArguments.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/helpers/yunohostArguments.js b/app/src/helpers/yunohostArguments.js index 3541e23a..bcaea706 100644 --- a/app/src/helpers/yunohostArguments.js +++ b/app/src/helpers/yunohostArguments.js @@ -70,7 +70,13 @@ export function formatYunoHostArgument (arg) { { types: [undefined, 'string', 'path'], name: 'InputItem', - props: defaultProps.concat(['autocomplete', 'trim']) + props: defaultProps.concat(['autocomplete', 'trim', 'choices']), + callback: function () { + if (arg.choices) { + arg.type = 'select' + this.name = 'SelectItem' + } + } }, { types: ['email', 'url', 'date', 'time', 'color'],