We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2b845b commit e6a2382Copy full SHA for e6a2382
packages/material-renderers/src/util/debounce.ts
@@ -40,7 +40,7 @@ export const useDebouncedChange = ({
40
handleChange,
41
data,
42
path,
43
- eventToValue = defaultEventToValue,
+ eventToValue = undefined,
44
defaultValue = '',
45
flushOnBlur = false,
46
focused = false,
@@ -61,7 +61,9 @@ export const useDebouncedChange = ({
61
}, [focused, flushOnBlur, debouncedUpdate]);
62
const onChange = useCallback(
63
(ev: any) => {
64
- const newValue = eventToValue(ev);
+ const newValue = eventToValue
65
+ ? eventToValue(ev)
66
+ : defaultEventToValue(ev);
67
setInput(newValue ?? defaultValue);
68
debouncedUpdate(newValue);
69
},
0 commit comments