Skip to content

Commit 87d28cb

Browse files
fix keyboard progress increment getting stuck at 6 (#572)
`setMax` updates the internal "mKeyProgressIncrement" and on initial load the value will be set to 6 due to Math.round(DEFAULT_TOTAL_STEPS (128) / 20). And its hard to get it out of 6 if the range is not high enough so lets revert it back to 1 to respect mStep --------- Co-authored-by: Bartosz Klonowski <[email protected]>
1 parent e2b6172 commit 87d28cb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

package/android/src/main/java/com/reactnativecommunity/slider/ReactSlider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ private void updateAll() {
216216
mStepCalculated = (mMaxValue - mMinValue) / (double) DEFAULT_TOTAL_STEPS;
217217
}
218218
setMax(getTotalSteps());
219+
setKeyProgressIncrement(1);
219220
updateLowerLimit();
220221
updateUpperLimit();
221222
updateValue();

0 commit comments

Comments
 (0)