From dc9194ca00d7f5633140a2ef7e2d506e3561e73e Mon Sep 17 00:00:00 2001 From: yusheng chen Date: Sat, 5 Apr 2025 14:56:54 +0800 Subject: [PATCH] fix: change `Switch.props.ref` to optional prop to align with `OriginalSwitch` (#17443) --- web/app/components/base/switch/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/base/switch/index.tsx b/web/app/components/base/switch/index.tsx index fdc03be4d6..1faf7c504a 100644 --- a/web/app/components/base/switch/index.tsx +++ b/web/app/components/base/switch/index.tsx @@ -20,7 +20,7 @@ const Switch = ( disabled = false, className, }: SwitchProps & { - ref: React.RefObject; + ref?: React.RefObject; }, ) => { const [enabled, setEnabled] = useState(defaultValue)