Radio Button default selection throws warnings

UI Components for React
Post Reply
drabikowy
Posts: 3
Joined: 16 Apr 2018, 10:29

09 May 2018, 17:59

Hello! Is there a chance to set one of radiobuttons as checked by default?
When I set state as checked as default It throws me warnings in console, like this:

Warning: Failed prop type: You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.

Maybe you could provide defaultChecked option to RadioButton?

Best regards

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

10 May 2018, 13:14

Fixed for 1.6.0.

Best Regards,

drabikowy
Posts: 3
Joined: 16 Apr 2018, 10:29

10 May 2018, 14:00

Thank's a lot!

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

10 May 2018, 14:05

You're welcome!

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests