Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autofocus TextField using React Material-UI

I use Material-UI TextField

I want to implement an autofocus, I can't find a way to do it from markup by setting autofocus=true not programmatically. any help?

like image 423
Amr M. AbdulRahman Avatar asked Oct 19 '16 13:10

Amr M. AbdulRahman


1 Answers

You can do this like this: <TextField autoFocus></TextField>.

More on this: https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes.

like image 54
Deividas Karzinauskas Avatar answered Oct 05 '22 10:10

Deividas Karzinauskas