Skip to content

Commit b89ac79

Browse files
authored
Merge pull request #38 from openzim/string_enum
Propose the 'Not set' value only if flag is not required
2 parents 7934fc9 + 169730d commit b89ac79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/src/components/NewRequest.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@
162162
if (field.type == "string-enum") {
163163
component = "b-form-select";
164164
options = field.choices.map(function (option) { return {text: option, value: option}; });
165-
options.push({text: "Not set", value: undefined});
165+
if (field.required != true) {
166+
options.push({text: "Not set", value: undefined});
167+
}
166168
}
167169
168170
if (field.type == "text") {

0 commit comments

Comments
 (0)