From e1cd35e5195e126876bb9d87543cbbfecbec992d Mon Sep 17 00:00:00 2001 From: elias-oxopia Date: Mon, 26 Jun 2023 11:49:17 +0800 Subject: [PATCH 1/2] fix(checkbox): value prop updates internal state --- src/components/Checkbox/Checkbox.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Checkbox/Checkbox.tsx b/src/components/Checkbox/Checkbox.tsx index c41abbf..8253842 100644 --- a/src/components/Checkbox/Checkbox.tsx +++ b/src/components/Checkbox/Checkbox.tsx @@ -21,6 +21,7 @@ const Checkbox = React.forwardRef( const [isChecked, setIsChecked] = useState(value ?? false); useEffect(() => { + // fix setIsChecked(value ?? false); }, [value]); From 816ecce13664886341a67008a21cd8d824ce7db4 Mon Sep 17 00:00:00 2001 From: elias-oxopia Date: Mon, 26 Jun 2023 11:50:00 +0800 Subject: [PATCH 2/2] fix(modal): added optional maxWidth prop --- src/components/Modal/Modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Modal/Modal.tsx b/src/components/Modal/Modal.tsx index 62b39a4..5e93495 100644 --- a/src/components/Modal/Modal.tsx +++ b/src/components/Modal/Modal.tsx @@ -30,7 +30,7 @@ const Modal: React.FC & { Footer: typeof Footer } = ({ onEscKeyDown, className, children, - maxWidth, + maxWidth, // added optional maxWidth prop }: Props) => { const modalRef = React.useRef(null);