Home > Back-end >  How to access the value of an input in Material UI
How to access the value of an input in Material UI

Time:10-31

I don't know how to access the value of the input, I've searched all over https://mui.com/material-ui/react-text-field/ and haven't found an answer. Here is my TextField `

<TextField
  id="outlined-search"
  label="Поиск по названию"
  variant="outlined"
  onInput={console.log('Input FIRE')}
/>

onInput doesn't work yet.

I don’t remember what I tried, my ass is on fire.

CodePudding user response:

Please check this event, it could be helpful

onInput={e => console.log('Input FIRE>>', e)}

you can try to check this one e.target.value or something different.

  • Related