mdbootstrap / mdb-react-ui-kit

React 18 & Bootstrap 5 & Material Design 2.0 UI KIT
https://mdbootstrap.com/docs/b5/react/
Other
1.41k stars 264 forks source link

How to set focus on input? #57

Closed shaggyrec closed 5 years ago

shaggyrec commented 5 years ago

Or how get access to the html input element

Rotarepmi commented 5 years ago

That is kind of trick. You have to use Ref and then findDOMNode for that Ref. Seems like a thing which we could improve.

Thanks for posting the question.

Rotarepmi commented 5 years ago

Hey,

Please check our newest update. Inputs have been rewritten and they should perform much better. You can use them as the controlled or uncontrolled input, and set your callback refs.

Best, Jakub