react-hook-form 7.28.0 → 7.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1545,9 +1545,10 @@ function createFormControl(props = {}) {
1545
1545
  else if (fieldReference.refs) {
1546
1546
  if (isCheckBoxInput(fieldReference.ref)) {
1547
1547
  fieldReference.refs.length > 1
1548
- ? fieldReference.refs.forEach((checkboxRef) => (checkboxRef.checked = Array.isArray(fieldValue)
1549
- ? !!fieldValue.find((data) => data === checkboxRef.value)
1550
- : fieldValue === checkboxRef.value))
1548
+ ? fieldReference.refs.forEach((checkboxRef) => !checkboxRef.disabled &&
1549
+ (checkboxRef.checked = Array.isArray(fieldValue)
1550
+ ? !!fieldValue.find((data) => data === checkboxRef.value)
1551
+ : fieldValue === checkboxRef.value))
1551
1552
  : fieldReference.refs[0] &&
1552
1553
  (fieldReference.refs[0].checked = !!fieldValue);
1553
1554
  }