Skip to content

Commit

Permalink
Merge pull request #16759 from mvdbeek/fix_required_select_field
Browse files Browse the repository at this point in the history
[23.1] Don't allow empty selection on required select field
  • Loading branch information
mvdbeek authored Sep 29, 2023
2 parents 488c082 + ac3cd58 commit 395a043
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/src/components/Form/Elements/FormSelect.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ describe("FormSelect", () => {

it("multiple values", async () => {
const wrapper = createTarget({
optional: true,
multiple: true,
options: defaultOptions,
value: ["value_1", "", 99],
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Form/Elements/FormSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ onMounted(() => {
<multiselect
v-if="hasOptions"
v-model="currentValue"
:allow-empty="true"
:allow-empty="optional"
:class="['form-select', cls]"
:close-on-select="!multiple"
:deselect-label="deselectLabel"
Expand Down

0 comments on commit 395a043

Please sign in to comment.