I am trying to display and hide a fab.group. When I tried the first time It is works, I can hide the fab and display it again. But when I try again, I can not hide it
Being able to hide the fab more than once
_callOtherview( ) {
this._hide();
Actions.comment({ changeState: this._display }); // I am using to change the current view with 'react-native-router-flux'
}
_display = () => {
this.setState({
displayButton: true,
});
}
_hide = () => {
this.setState({
displayButton: false,
});
}
render () {
return(
open={this.state.open}
icon={require( '../../../src/favicon.jpg')}
actions={[
{ icon: 'camera', label: 'Foto', onPress: this._selectPhoto },
{ icon: 'comment', label: 'Comentario', onPress: this._sendComment },
]}
onStateChange={({ open }) => this.setState({ open })}
onPress={() => {
if (this.state.open) {
// do something if the speed dial is open
}
}}
/>
)
}
I checked if the state is well implemented and also I tried to implement the fab by another way, somithing like this:
if (this.state.display) {
return
} else {
return null
}
But I had the same problem
| software | version
| --------------------- | -------
| ios or android | android
| react-native | 0.55
| react-native-paper | 2.7
| node | 10.13
| npm or yarn | 6.4.1
| expo sdk |
@Kevinmenar can you try this? for me it's working fine.
can you reproduce a issue and share the link?
@Kevinmenar , is it still valid issue? If yes please provide a snack with reproducible bug.
Most helpful comment
@Kevinmenar can you try this? for me it's working fine.
can you reproduce a issue and share the link?