Slider jumps when minimum value is negative

So not sure whats happening, but every time we release the slider it jumps around making it pretty much impossible to use:
Slider::make('icon_grad')
->label('Grade')
->range(minValue: -25, maxValue: 200)
->step(1)
->default(0)
->tooltips()
->helperText('Fine-tune visual emphasis'),
Slider::make('icon_grad')
->label('Grade')
->range(minValue: -25, maxValue: 200)
->step(1)
->default(0)
->tooltips()
->helperText('Fine-tune visual emphasis'),
1 Reply
Mouse0270
Mouse0270OP2mo ago
Also its weird cause even though I have step set to 1 I sometimes get values like 29.99999999999999 I figured out something, it has to do with the min value being less then 0. Changing the min value to 0 instead of -25 seems to resolve all my issues, but technically I need to fix this as the min value can be a negative number.

Did you find this page helpful?