-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: check for invalid configuration in limit settings #638
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If lowerLimit > upperLimit
we shouldn't fallback to upperLimit
. If we do that, then we will end up with having lowerLimit === upperLimit
, which will prevent Slider from moving at all. This is not the best experience.
If a dev/user makes a simple mistake, typo, of having lowerLimit
greater than the upper one, then we should just avoid setting that incorrect limit. In that worst case, the limit that is incorrect will just not work, not the whole Slider.
package/android/src/main/java/com/reactnativecommunity/slider/ReactSlider.java
Outdated
Show resolved
Hide resolved
package/android/src/main/java/com/reactnativecommunity/slider/ReactSlider.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good! 👍
Summary:
fixes: #571
Apply additional check and move the progress calculation to Slider class
Test Plan:
Have ran the application examples on new/old arch witch success - the crash is not happening anymore.