TriStateCheckbox: Warning: value
prop on input
should not be null. Consider using an empty string to clear the component or undefined
for uncontrolled components.
#7313
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
Using TriStateCheckbox component with
null
value gives console error.I am using the TriStateCheckbox as it is described in the component description https://primereact.org/tristatecheckbox/#basic. However, this provides errors in the console in the browser dev tools. I cannot not prevent the error from the log. Even if I initialized the state to
false
ortrue
, it gives more errors when changing the state tonull
.I'm using the code example:
Any comment would be really appreciated! Thank you!
Reproducer
No response
System Information
Steps to reproduce the behavior
Go to the demo page https://primereact.org/tristatecheckbox/#basic (primereact version 10.8.3)
Click "Edit in StackBlitz" on the Basic TriStateCheckbox example.
Go to the StackBlitz page for "PrimeReact Demo" and wait the packages are installed for the component.
Open the browser dev tools.
Error log appears in console.
Click the checkbox to change the state from
null
totrue
.Another error log appears in console.
Expected behavior
The errors should not appear in the console of dev tools.
The text was updated successfully, but these errors were encountered: