I'm unable to hide the backButton
on the topBar
. I don't want to make the entire topBar
visible:false
as suggested here: https://github.com/wix/react-native-navigation/issues/3826 as I want some rightButtons
.
I tried this:
options: {
topBar: {
backButton: { }
}
}
But the button was still visible and worked. As a hack/workaround I can do this as my top bar is white:
options: {
topBar: {
backButton: { color: '#ffffff' }
}
}
But its not ideal since the buttons is still there just not visible. I would have expected backButton: {}
to clear it out.
I guess its possible to Navigation.setRoot
as well but then you lose the slide effect.
If you look at the documentation, there is a style option for backButton. Link.
You can do:
topBar: {
backButton: {
visible: false
}
}
Doesnt look like this works in 2.2.0 on iOS
A workaround
leftButtons: [
{
id: 'something',
text: '',
},
],
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
This is still an issue.
I second this request, this is quite a big issue. Current state: it does work on IOS but not on Android.
@kiroukou as a work around I added backgroundColor: ' transparent'
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
still an issue
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
still an issue
Damn, I thought to find a solution on this issue here :/
The workaround with the empty leftButton is no solution because it leave the gap on the left side.
As @thinklinux mentioned, this workaround is working fine:
leftButtons: [
{
id: 'something',
text: '',
},
],
The thing is you need to use this when you are pushing the screen and not in mergeOptions
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.
This is still an issue.
Can confirm the following does not work on Android.
backButton: {
visible: false,
},
Seems to be an issue still.
Still an issue, I don't know what's going on with wix but this is SOOO sooo bad man.
Feels like this library has ben left to rot, all the issues get closed after months of existence without anyone ever taking a look at them, and this just hurts the wix brand I think.
I believe the way to go is start looking for maintainers for this repo..
I'm using RNN 6.6.2 issue still not fixed. Any updates about this problem? @guyca
Still not fixed on Android and RNN v6.10.1. Still having this issue since v2...
Please reopen!
Hey @zabojad
I've tried hiding the back button in the Playground app both in static and merge options. Both seem to work as expected on Android.
<Button
label="Hide back button"
onPress={() => {
Navigation.mergeOptions(this, {
topBar: {
backButton: {
visible: false,
},
},
});
}}
/>
static options(): Options {
return {
topBar: {
backButton: {
visible: false,
},
},
};
}
If this is still an issue - please open another issue and provide a reproduction. Thanks and sorry for the inconvenience.
Most helpful comment
A workaround