odaptos_design_system 2.0.182 → 2.0.185

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.
@@ -11538,6 +11538,13 @@ const Checkbox = ({
11538
11538
  name
11539
11539
  }) => {
11540
11540
  const [isChecked, setIsChecked] = React.useState(checked);
11541
+ React.useEffect(() => {
11542
+ console.log('isChecked', isChecked);
11543
+ }, [isChecked]);
11544
+ React.useEffect(() => {
11545
+ console.log('checked', checked);
11546
+ setIsChecked(checked);
11547
+ }, [checked]);
11541
11548
  return /*#__PURE__*/React__default.createElement("div", {
11542
11549
  className: `${styles$b.checkboxContainer} ${disabled ? styles$b.disabled : ''} ${className}`,
11543
11550
  style: {
@@ -11545,11 +11552,12 @@ const Checkbox = ({
11545
11552
  },
11546
11553
  onClick: () => {
11547
11554
  if (!disabled) {
11548
- setIsChecked(prev => !prev);
11555
+ const newValue = !isChecked;
11556
+ setIsChecked(newValue);
11549
11557
  onChange({
11550
11558
  target: {
11551
11559
  name: name || '',
11552
- value: isChecked
11560
+ value: newValue
11553
11561
  }
11554
11562
  });
11555
11563
  }