This commit is contained in:
Olivier Gagnon
2022-07-14 19:09:21 -04:00
parent 6a11998427
commit a0994a088c

View File

@ -2,7 +2,7 @@ import { Slider, Tooltip, Typography, Box } from "@mui/material";
import React, { useState } from "react";
interface IProps {
initialValue: any;
initialValue: number;
callback: (event: any, newValue: number | number[]) => void;
step: number;
min: number;
@ -16,7 +16,7 @@ export const OptionsSlider = (props: IProps): React.ReactElement => {
const [value, setValue] = useState(props.initialValue);
const onChange = (_evt: Event, newValue: number | Array<number>): void => {
setValue(newValue);
if (typeof newValue === "number") setValue(newValue);
};
return (