Skip to content

Commit

Permalink
fix: prevent duplicated selected item on initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
fterra-encora committed Jan 2, 2024
1 parent 663672e commit f11da79
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const emitChange = () => {
const addFromSelection = (itemCode: string) => {
const reference = props.modelValue.find((entry) => entry.name === itemCode);
if (reference) {
if (reference && !items.value.includes(reference.name)) {
items.value.push(reference.name);
selectedValue.value = items.value.join(",");
}
Expand Down

0 comments on commit f11da79

Please sign in to comment.