property "disabled" doesn't work on Android (4.4.2)
evilrescuer opened this issue · 2 comments
evilrescuer commented
Environment
"@react-native-community/slider": "4.4.2",
- react-native info output:
info Fetching system and libraries information...
System:
OS: macOS 12.6
CPU: (10) x64 Apple M1 Pro
Memory: 23.46 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
Yarn: Not Found
npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
Watchman: 2022.11.14.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/linzhimao/.rvm/rubies/ruby-2.7.4/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.19 - /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.3 => 0.67.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Description
property "disabled" doesn't work on Android,
device: HONOR 20i
HRY-AL00Ta
Reproducible Demo
import Slider from '@react-native-community/slider';
<Slider
style={{ width: '78%' }}
**disabled={sliderDisabled}**
step={1}
value={XXX}
onValueChange={XXX}
onSlidingComplete={XXX}
minimumValue={XXX}
maximumValue={Math.ceil(XXX)}
maximumTrackTintColor="rgb(220,220,220)"
minimumTrackTintColor="#00acef"
/>
Now, I use the workAround to disable the moving, but ignore the style:
<View
pointerEvents={sliderDisabled ? 'none' : undefined}>
<Slider
{...the same as above}
/>
</View>
But I still looking forward to get a final fix.
releated issue: #344 (comment)
evilrescuer commented
Sorry, I think that's a problem about react-native cache when I upgraded my react-native-slider
to the latest.
After I literally upgrade to react-native-slider@4.4.2
, every things is ok.
BartoszKlonowski commented
No worries, @evilrescuer, I'm glad your issue is resolved.