diff --git a/src/components/DropdownSelect.vue b/src/components/DropdownSelect.vue index 9164c06..5205ec8 100644 --- a/src/components/DropdownSelect.vue +++ b/src/components/DropdownSelect.vue @@ -171,11 +171,14 @@ const { updateModelValue, } = useMultiselect(props, emit); -const setModelValue = (event: Event) => { +const setModelValue = ( + event: Event, + existingValue = false as number | false +) => { const target = event.target as HTMLInputElement; const value = target.value; - updateModelValue(value, target.checked); + updateModelValue(value, target.checked, existingValue); }; const filteredOptions = computed(() => { @@ -357,7 +360,7 @@ defineExpose({ focus });