Skip to content

Commit

Permalink
fix: account for breaking changes in VFileInput's onUpdate:ModelValue…
Browse files Browse the repository at this point in the history
… event.
  • Loading branch information
ascott18 committed Sep 12, 2024
1 parent 95277e1 commit 21228be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/coalesce-vue-vuetify3/src/components/input/c-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,12 @@ function render() {
data.modelValue = [];
if (value) data.modelValue.push(value);
}
// Unwrap array on input
addHandler(data, "update:modelValue", (value: any[]) =>
onInput(value[0])
);
const updateHandler: VFileInput["$props"]["onUpdate:modelValue"] = (
value
) => onInput(Array.isArray(value) ? value[0] : value);
addHandler(data, "update:modelValue", updateHandler);
return h(VFileInput, data, vuetifySlots);
Expand Down

0 comments on commit 21228be

Please sign in to comment.