File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
package/harmony/slider/src/main/ets Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ const TAG: string = "[RNOH] RNCSlider"
37
37
38
38
export const SLIDER_TYPE: string = "RNCSlider"
39
39
40
+ const DEFAULT_LIMIT_VALUE = -9007199254740991;
41
+ const DEFAULT_MAX_VALUE = 9007199254740991;
42
+
40
43
export interface SliderProps extends ViewBaseProps {
41
44
thumbImage?: string
42
45
maximumTrackTintColor?: ColorSegments
@@ -170,6 +173,10 @@ export struct RNCSlider {
170
173
.showSteps(false)
171
174
.blockStyle(this.descriptorWrapper?.BlockStyle)
172
175
.onChange((value: number, mode: SliderChangeMode) => this.onSliderChange(value, mode))
176
+ .slideRange({
177
+ from: this.lowerLimit === DEFAULT_LIMIT_VALUE ? this.descriptorWrapper?.minimumValue : this.lowerLimit,
178
+ to: this.upperLimit === DEFAULT_MAX_VALUE ? this.descriptorWrapper?.maximumValue : this.upperLimit
179
+ })
173
180
}
174
181
}
175
182
}
You can’t perform that action at this time.
0 commit comments