Skip to content

Commit

Permalink
fix: switch now changing values in form
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-belcher committed Nov 17, 2023
1 parent f767a24 commit 09fa6ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/services/ui/src/components/Inputs/switch.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react/prop-types */
import * as React from "react";
import * as SwitchPrimitives from "@radix-ui/react-switch";

Expand All @@ -19,6 +20,10 @@ const Switch = React.forwardRef<
className
)}
{...props}
onCheckedChange={(value) => {
(props.onChange as any)?.(value);
props.onCheckedChange?.(value);
}}
ref={ref}
>
<SwitchPrimitives.Thumb
Expand Down

0 comments on commit 09fa6ab

Please sign in to comment.