Topic: react Input checkbox does does not reflect provided value
uhligjens pro asked 6 years ago
Jakub Strebeyko staff answered 6 years ago
uhligjens pro answered 6 years ago
Jakub Strebeyko staff answered 6 years ago
<Input type="checkbox">
is being rendered as a controlled component and while it is working visually (meaning clicking it has the box checked or not), when being rendered with value
attribute evaluated to true>
, the box still gets initially rendered as false
and therefore clicking it is opposite to the value passed? If that is the case, please make sure you also pass the checked
attribute along with the component, for example checked={this.state.selectedBool}
. We will definitely have it simplified in the next release cycle.
If what I described above is not what you meant, please describe "not reflecting" Input's behavior is some more detail.
With Best Regards,
Kuba
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
- Premium support: No
- Technology: MDB React
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No