'MaterialUI `onBlur` doesn't work on TextField component --> any alternative?
I want to run a handler onBlur of an input TextField (material UI component). However, mUI doesn't seem to provide this for the TextField component. How would I work-around this?
// doesn't work for TextField component -->
..
<div className="flex w-2/8">
<TextField
sx={{ width: '100%', marginRight: '5px' }}
id="outlined-adornment-amount"
value={values.increase}
onBlur={handleChange('increase')}
label="Increase"
type="number"
inputProps={{
inputMode: 'numeric',
pattern: '[0-9]*',
min: 0,
max: 100,
}}
InputProps={{
startAdornment: <InputAdornment position="start">%</InputAdornment>
}}
/>
</div>
// works -->
..
onChange={handleChange('increase')}
..
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
