Skip to content

Commit

Permalink
Disable Slider when submitting
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNeshi committed Dec 21, 2023
1 parent d9b7453 commit d25d1d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Split/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export default function Slider<FV extends FieldValues, P extends Path<FV>>(
) {
const {
register,
formState: { isValid },
formState: { isValid, isSubmitting },
} = useFormContext<FV>();

return (
<div className={`${props.className || ""} select-none`}>
<input
className="range"
disabled={!isValid || props.disabled}
disabled={!isValid || isSubmitting || props.disabled}
{...register(props.liqPctField)}
type="range"
/>
Expand Down

0 comments on commit d25d1d3

Please sign in to comment.