Skip to content

Commit da11b72

Browse files
committed
Ensure that selection sliders return integer values for indices.
According to the nouislider docs, it returns values to 2 decimal places, and the place to make sure we have integers is in the to transformation function. Fixes #3363
1 parent 6456032 commit da11b72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/controls/src/widget_selection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ export class SelectionSliderView extends DescriptionView {
765765
direction: orientation === 'horizontal' ? 'ltr' : 'rtl',
766766
format: {
767767
from: (value: string): number => Number(value),
768-
to: (value: number): number => value,
768+
to: (value: number): number => Math.round(value),
769769
},
770770
});
771771

0 commit comments

Comments
 (0)