GUI: Fix filtering not being clamped properly (#296)

This commit is contained in:
Erimel
2022-11-24 15:32:38 -05:00
committed by GitHub
parent 1ac0a380db
commit 0a2d5674f7
2 changed files with 3 additions and 2 deletions

View File

@@ -22,7 +22,8 @@ export function NumberSelector({
const stepFn =
typeof step === 'function'
? step
: (value: number, add: boolean) => (add ? value + step : value - step);
: (value: number, add: boolean) =>
+(add ? value + step : value - step).toFixed(2);
return (
<Controller

View File

@@ -267,7 +267,7 @@ export function GeneralSettings() {
label="Amount"
valueLabelFormat={(value) => `${Math.round(value * 100)} %`}
min={0.1}
max={1}
max={1.0}
step={0.1}
/>
</div>