()
| 100 | ); |
| 101 | |
| 102 | const onEvent = () => { |
| 103 | const {value: inputValue} = input.current; |
| 104 | const valueAsNumber = convert(inputValue); |
| 105 | if (type === HTMLInputTypes.number) { |
| 106 | setPropValue(props.value, valueAsNumber ?? value); |
| 107 | } else { |
| 108 | const propValue = |
| 109 | inputValue === '' && props.value === undefined |
| 110 | ? undefined |
| 111 | : inputValue; |
| 112 | props.setProps({value: propValue}); |
| 113 | } |
| 114 | setPendingEvent(undefined); |
| 115 | }; |
| 116 | |
| 117 | const onBlur = useCallback(() => { |
| 118 | props.setProps({ |