React-native-paper: After change state of a Button (disabled = true then false again) only the text area is touchable, there is no TouchableRipple on its surface anymore

Created on 21 Aug 2019  路  3Comments  路  Source: callstack/react-native-paper

Environment


```
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28, 29
Build Tools: 27.0.3, 28.0.3
System Images: android-19 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64, android-24 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-alert-async: 1.0.3
react-native-clean-project: 3.2.4
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-html-to-pdf: 0.8.0
react-native-navigation: 2.16.0
react-native-rename: 2.4.1
react-native-share: 1.1.3

## Description

When the disabled prop of a Button is set to true and then set it back to false, the button lose his TouchableRipple on its surface, just the <Text> become touchable.

**This issue happen only in android.** 

## Reproducible Demo

constructor(props) {
super(props);
this.state = {
desativado: false
};
}

async componentDidMount() {
setTimeout(() => {
this.setState({ desativado: false });
}, 4000);
}

render(){
return (
label={'Entrar'}
color={'blue'}
onPress={async () => {
await this.setState({ desativado: true });
}}
disabled={this.state.desativado}
mode="contained"
dark={true} >

);
```

Most helpful comment

@cassioseffrin This is fixed in 3.0 with https://github.com/callstack/react-native-paper/pull/1226 . Can you try 3.0-alpha version?

All 3 comments

@cassioseffrin This is fixed in 3.0 with https://github.com/callstack/react-native-paper/pull/1226 . Can you try 3.0-alpha version?

@Trancever ,

I tried the last alpha version: npm i [email protected] and the issue has gone!

The version alpha.3 is almost done to enter in production?

Thks!

Yes, we will release stable version in a few days

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mihaidaviddev picture mihaidaviddev  路  3Comments

tonyxiao picture tonyxiao  路  3Comments

makhataibar picture makhataibar  路  4Comments

yaronlevi picture yaronlevi  路  3Comments

ButuzGOL picture ButuzGOL  路  4Comments