primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Checkbox: value prop not being used to populate the input's value attribute

Open maxchan23 opened this issue 8 months ago • 1 comments

Describe the bug

When using the value prop in a Checkbox component, I noticed that the value is not being used to populate the actual input's value attribute.

Image

Reproducer

No response

System Information

-

Steps to reproduce the behavior

  1. Go to the Checkbox documentation -> scroll to the Dynamic section : https://primereact.org/checkbox/
  2. inspect the Marketing checkbox, click into its input element
  3. the value attribute is not being set as intended even though the category is being passed in as a value prop

Expected behavior

The value should be used to populate the input's value attribute. I'm currently working around this by adding a defaultValue in the pt prop like so pt={{ input: { defaultValue: category } }}

maxchan23 avatar Mar 06 '25 00:03 maxchan23