If problematically set disabled prop to false then afterwords the FAB never responds with disabled={true}. FAB is greyed out properly according to whether disabled or not but completely freezes if once disabled.
TRIED WITH MULTIPLE PROJECTS USING RN 0.60.4 - GOT SAME RESULTS
Here is my code:-
import React, {Component} from 'react';
import {
StyleSheet,
View,
Text,
Button,
Alert
} from 'react-native';
import { FAB } from 'react-native-paper';
export default class FabComponent extends Component {
state = {
disableFab: false
}
handleFabPress = () => {
Alert.alert(
'Alert Title',
'You pressed the floating button',
[
{
text: 'Cancel',
onPress: () => console.log('Cancel Pressed'),
style: 'cancel',
},
{text: 'OK', onPress: () => console.log('OK Pressed')},
],
{cancelable: false},
);
}
render() {
return (
<View style={styles.container}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Button
onPress={() => {
this.setState((prevState) => {
return {
disableFab: ! prevState.disableFab
}
})
}
}
title={this.state.disableFab? 'Enable FAB' : 'Disable FAB'}
color="#488c51"
/>
</View>
<FAB
style={styles.fab}
small={false}
icon="add"
disabled={this.state.disableFab}
onPress={this.handleFabPress}
/>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
fab: {
position: 'absolute',
margin: 16,
right: 0,
bottom: 0,
},
});
the repo is here - https://github.com/devsrv/rnpaper-fab
It must be something with accessibility. @pan-pawel Can you check it?
normal Button component acts like this as well.
Hello @devsrv!
Can you please try upgrade react-native-paper to 3.0.0-alpha.3?
My fix touchable-ripple-toggling-disable-prop was merged there
The problem occurs with RN > 0.60, There were some changes with accessibility 0.59 -> 0.60 and they causing this issue.
the problem is fixed in 3.0.0-alpha.3 however getting a prop error warning & the icon is not appearing on the FAB.


@Trancever This is related to icon problems in paper 3?
@devsrv Paper v3 uses react-native-vector-icons/Material-Community-Icons instead of react-native-vector-icons/Material-Icons by default so you need to update name of the icon or use old Icon component via settings prop on PaperProvider. You can see how to do it here
fixed 馃コ
Most helpful comment
@devsrv Paper v3 uses
react-native-vector-icons/Material-Community-Iconsinstead ofreact-native-vector-icons/Material-Iconsby default so you need to update name of the icon or use old Icon component via settings prop on PaperProvider. You can see how to do it here