Skip to content

Commit

Permalink
fix: handle checkbox value true
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Jan 11, 2024
1 parent 635f262 commit ec73ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/setValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const setValue = (el, value, dispatch) => {

for (let i = 0; i < inputs.length; i++) {
if (inputs[i].value) {
if (value.includes(inputs[i].value))
if (value === true || value.includes(inputs[i].value))
inputs[i].checked = true;
else
inputs[i].checked = false;
Expand Down

0 comments on commit ec73ce0

Please sign in to comment.