Skip to content

Commit

Permalink
fix(core): reset select value if input is required
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnfeldpausch committed Jun 19, 2024
1 parent a0bdf28 commit 3366817
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/components/cat-select/cat-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,7 @@ export class CatSelect {
selectionClone.pop();
this.patchState({ selection: selectionClone, tempSelection: [...this.state.selection] });
}

if (!this.input?.value.trim()) {
if (!this.required && !this.input?.value.trim()) {
this.patchState({ tempSelection: [] });
}
}
Expand Down

0 comments on commit 3366817

Please sign in to comment.