fix: form autofill on chrome mobile wasn't handled correctly

Massimo Melina committed Jul 15, 2023 at 17:08 UTC dc62986648541d3ce4f8801006ef66c68d421b71
1 file changed +1
mui-grid-form/StringField.ts
+1
@@ -36,6 +36,7 @@ export function StringField({ value, onChange, min, max, required, getApi, typin
36 ...props,
37 sx: props.label ? props.sx : Object.assign({ '& .MuiInputBase-input': { pt: 1.5 } }, props.sx),
38 value: state,
39 + onInput(ev: any) { go(ev, ev.target.value) }, // necessary to support autofill on chrome mobile
40 onChange(ev) {
41 const val = ev.target.value
42 if (onTyping?.(val) === false) return