Skip to content

Commit

Permalink
fix the change to allow passing DispatchPropsOfMultiEnumControl
Browse files Browse the repository at this point in the history
  • Loading branch information
kchobantonov committed Dec 3, 2024
1 parent 3ace1e3 commit 78742e1
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions packages/vue-vuetify/src/util/composition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,17 @@ export const useVuetifyControl = <
) => {
const touched = ref(false);

let onChange = undefined;

if ((input as DispatchPropsOfControl).handleChange) {
const changeEmitter =
typeof debounceWait === 'number'
? debounce((input as DispatchPropsOfControl).handleChange, debounceWait)
: (input as DispatchPropsOfControl).handleChange;

onChange = (value: any) => {
const changeEmitter =
typeof debounceWait === 'number' &&
(input as DispatchPropsOfControl).handleChange
? debounce((input as DispatchPropsOfControl).handleChange, debounceWait)
: (input as DispatchPropsOfControl).handleChange;

const onChange = (value: any) => {
if (changeEmitter) {
changeEmitter(input.control.value.path, adaptValue(value));
};
}
}
};

const appliedOptions = useControlAppliedOptions(input);
const isFocused = ref(false);
Expand Down

0 comments on commit 78742e1

Please sign in to comment.