mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
fix(web/dialog): set slider value to min if default is not defined
This commit is contained in:
@@ -10,7 +10,7 @@ interface Props {
|
||||
|
||||
const SliderField: React.FC<Props> = (props) => {
|
||||
useEffect(() => {
|
||||
if (props.row.default) props.handleChange(props.row.default, props.index);
|
||||
if (props.row.default || props.row.min) props.handleChange(props.row.default || props.row.min!, props.index);
|
||||
}, []);
|
||||
|
||||
const [sliderValue, setSliderValue] = useState(props.row.default || props.row.min || 0);
|
||||
|
||||
Reference in New Issue
Block a user