-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
[NavigatorIOS] resetTo will not change the title or rightButton #476
Comments
This is happening to me as well, pretty sure it's a bug, since |
This seems to be a bug with any navigation that defers to This might also have to do with the fact that the navigation containers are keyed by index, rather than some combination of the route+index. I haven't been able to change that key to something more unique without running into the locking issue mentioned above, but if the key has not changed, I wouldn't expect React to re-render the nav bar title. This also would explain why push/pop changes the title, because the container is briefly unmounted, so even though the key is reused, it must be mounted again causing a render. |
@ericvicenti thoughts? If I was on the right path I could try put a pull request together. Don't really have a sense of the scale of the issue though. |
Yeah, it sounds like you are on the right track. If this is affecting you then I would see what you can do to fix it or work around it. We don't use NavigatorIOS internally, so we can't spend much time fixing things, but we are happy to accept any fixes that people contribute. |
+1 I'm having to same issue too. |
@ericvicenti do you guys just use navigator internally? |
Yep, we only use the Navigator in our apps right now. It gives us a bit more flexibility over gestures and animations, and we're using it on Android as well, which helps us share code. We don't have the bandwidth to support components which aren't used by our internal clients, so it is up to the community to maintain NavigatorIOS. We are happy to accept your PRs! |
@pwmckenna the base issue is that NavigatorIOS doesn't have the logic for updating nav items in-place see source |
I seems as if |
well i create this PR for that #1733 |
I've found a work around to use nextPage() {
global.__feedRoute = {
title: 'Feed',
component: require('../FeedContainer')
};
this.props.navigator.replace(__feedRoute);
} Then in the next component (Feed in this example), call // Feed.js
componentWillMount() {
this.props.navigator.resetTo(__feedRoute);
}, The first call to replace will change the title and hopefully the right button, this also does not animate it. The next call to |
same problem with replace |
may be this PR can help |
What needs to happen to fix this? Any way i can help? |
There is this: #3516 |
I check both implementation in objective c. i think the delegate link in this pr #2526 is more code compliant. |
I use |
Up! |
Summary: This fixes ```align-content: center``` and ```align-content: flex-end``` when the child exceeds the parents size. See #476. It also fixes those layouts if the child has ```margin: auto``` set. Closes facebook/yoga#477 Differential Revision: D4697833 Pulled By: emilsjolander fbshipit-source-id: d081ec7ea559a5f2bd3271c3a4dc272960beddfa
I'm not sure if this is a feature or a bug.
My initial route:
in
Login
, I have such function to handle reseting route:However, the title seems not change even the ChatList is rendered correctly.
The text was updated successfully, but these errors were encountered: