Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: change `Switch.props.ref` to optional prop to align with `OriginalSwitch` (#17443)

yusheng chendc9194ca00d7
diff --git a/web/app/components/base/switch/index.tsx b/web/app/components/base/switch/index.tsx
index fdc03be4d68..1faf7c504a2 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<HTMLButtonElement>;
+ ref?: React.RefObject<HTMLButtonElement>;
},
) => {
const [enabled, setEnabled] = useState(defaultValue)