We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa0e251 commit fd30f33Copy full SHA for fd30f33
components/dash-core-components/src/components/RangeSlider.tsx
@@ -18,9 +18,16 @@ export default function RangeSlider({
18
persistence_type = PersistenceTypes.local,
19
// eslint-disable-next-line no-magic-numbers
20
verticalHeight = 400,
21
- step = 1,
+ step = undefined,
22
...props
23
}: RangeSliderProps) {
24
+ // Some considerations for the default value of `step`:
25
+ // If the range consists of integers, default to a value of `1`
26
+ // Otherwise, leave it undefined
27
+ if (Number.isInteger(props.min) && Number.isInteger(props.max)) {
28
+ step = 1;
29
+ }
30
+
31
return (
32
<Suspense fallback={null}>
33
<RealRangeSlider
0 commit comments