Availity / availity-reactstrap-validation

Easy to use React validation components compatible for reactstrap.
https://availity.github.io/availity-reactstrap-validation/
MIT License
191 stars 70 forks source link

Fix checkbox defaultChecked state interpreted as not provided #205

Open Host32 opened 4 years ago

Host32 commented 4 years ago

AvCheckbox with default values was not correctly treating defaultChecked propertie, because a undefined value is treated as not provided, so the checkbocks is marked as checked even than the value is not present on array.

Reference: https://stackoverflow.com/questions/55259173/react-handling-multiple-checkboxes

So just adding a corrent treating for undefined return of find call solved the problem.