Property disbaled dont work
See original GitHub issueEnvironment
System: OS: macOS 12.0.1 CPU: (4) x64 Intel® Core™ i5-7267U CPU @ 3.10GHz Memory: 1.02 GB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 17.0.1 - /usr/local/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 8.1.0 - /usr/local/bin/npm Watchman: 2021.11.15.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.66.0 => 0.66.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Description
If the value for disabled is set to true, it has no effect. The slider can still be moved. Will try on the web.
Reproducible Demo
<ReactSlider
style={[styles.slider]}
value={value}
disabled={true}
minimumValue={minimumValue}
maximumValue={maximumValue}
step={step}
thumbTintColor={thumbTintColor}
minimumTrackTintColor={minimumTrackTintColor}
maximumTrackTintColor={maximumTrackTintColor}
onValueChange={newValue => onValueChange(newValue)}
/>
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
A quick workaround for me was to just wrap the slider in a
View
and disablepointerEvents
on it as a surrogate todisabled
Fixed in https://github.com/callstack/react-native-slider/pull/462