Clarification on onValueChange
Behavior Across Platforms
#562
Labels
bug report
Something isn't working
platform: Web
Issue relates to react-native for web
question
Further information is requested
Hello, and thank you for developing the react-native-slider package. I've been using it in my project and am extremely grateful for its existence.
I've noticed a discrepancy in behavior between the web and native platforms (Android & iOS) regarding the
onValueChange
event. Specifically, I'm uncertain ifonValueChange
should be triggered by programmatic changes to the slider value, as I couldn't find specific documentation on this aspect.On web,
onValueChange
is called when doing programmatic changes ofvalue
but not on iOS/Android.Could you clarify if it's reliable to assume that programmatic changes to the slider value will not trigger the
onValueChange
event? My concern stems from the need to distinguish between user-initiated and programmatic changes.Upon reviewing the code, I observed that the Android implementation utilizes a
fromUser
flag to differentiate the source of changes, but I didn't find a similar mechanism in the web implementation. Here is the relevant section of the code I was looking at:react-native-slider/package/src/RNCSliderNativeComponent.web.tsx
Line 148 in 6f8ee41
While I have examined the code, I must admit that I'm not completely familiar with the entire codebase, so I may have missed something pertinent.
Any guidance or clarification you can provide on this behavior would be greatly appreciated.
Thank you for your time and effort in maintaining this package.
The text was updated successfully, but these errors were encountered: