-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
renderLeftButton not working when back={true} #3188
Comments
I don't think it works like that with |
Basically, this is what I'm trying to do: I have to allow user to select multiple items and delete them, similar to the file manager. You have a delete button on the right, when clicked, the left button will be replaced with a "select all" check box. If the user press cancel or confirm, the left button will be reverted back to a normal "back" button. This is the only way I can think of doing it. Please feel free to suggest any better solution, if this is not how it suppose to do. |
@matthewkwong2 for params, that's correct, it is |
It seems for RN issues related to this: Libs that might help here: RN Docs: |
@matthewkwong2 It looks like a hack and probably just not supported by React Navigation 2.x (its SET_PARAMS action). Instead you should define one renderLeftButton that changes its content depending from navigation state. Actions.refresh should be used just to update navigational state (i.e. pass values not functions) |
Version
Tell us which versions you are using:
Expected behaviour
should override the back button and display the custom
<LeftButton/>
component in any case.Actual behaviour
This doesn't happen IF AND ONLY IF
I have also tried:
And none of above works.
Note, the back button still appear and takes effect when back is not specified (of course it will be hidden if back={false})
The text was updated successfully, but these errors were encountered: