Closed maxud3 closed 7 months ago
Hello. In useSilderAnimation.ts you can change
setValue((prevState: number) => {
prevValue.current = Math.round(
Math.abs(nValue - prevState) > diff / 4 ? prevState : nValue
);
return Math.round(
Math.abs(nValue - prevState) > diff / 4 ? prevState : nValue
);
});
with
setValue((prevState) => {
const roundedValue = parseFloat(nValue.toFixed(1));
prevValue.current = Math.abs(roundedValue - prevState) > diff / 4 ? prevState : roundedValue;
return Math.abs(roundedValue - prevState) > diff / 4 ? prevState : roundedValue;
});
and it will work with sub-units.
Hello! I need step to be 0.1. When I set props.step ={0.1} it only works when clicking on the arrows. When moving the slider, it doesn't work.