Topic: Floating label on the input field
<div> <Input label="Your name" icon="user" group type="email" validate error="wrong" success="right"/> </div> The react components page @mdbootstrap.com does not seem to show the behavior. Why does this occur in MDB React Pro version?
Jakub Strebeyko staff answered 7 years ago
Hi there,
Welcome to the support board! Thanks for taking time to reach out! The bug is caused by the fact that the TextField
component onFocus
event listener checks the ref
attribute before executing its state setting option to guard against focusing / blurring of the window (line 55). Since ref
attribute is based on the what the component is (basically, it points at the node itself), clicking on label does not pass the condition set in place. The bug has been reported and shall be fixed in the upcoming releases of MDB React sometime soon.
With Best Regards,
Kuba
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB React
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No