-
Notifications
You must be signed in to change notification settings - Fork 13.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
bug: Navigating between instances of the same route with different parameters does not show updated content #22931
Comments
Thanks for the issue. I am going to close this as a duplicate of #22662. |
Hi @liamdebeasi, thanks, I did see this after I just posted. I just want to check, in your bug report you say "The new page content simply appears.", whereas what I'm reporting here is that the new content doesn't display at all. Just want to make sure you're aware, they very well may be covering the same issue. |
Thanks for clarifying! Yeah I think the two issues are related. |
Thanks again Liam :-) |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic version:
[ ] 4.x
[x] 5.x
Current behavior:
Navigating between instances of the same route with different parameters does not create a new version of the component, and thus does not show the correct data for the route.
Expected behavior:
When navigating between the same route with different parameter, a new component should be spawned with its own state, allowing navigation back to the previous and separate instance.
Steps to reproduce:
(Note, I didn't setup Netlify redirects, so visit the root URL and navigate from within the app)
Related code:
This is the
ion-button
code, the only change made from the Vue sample:Other information:
This bug report says how components stay mounted in order to allow the state to be kept the same when navigating back through the history, but in this case the component is staying mounted and retains the original message data (index 0), instead of the new message data (index 5).
#20543
This makes sense but causes a problem in this situation.
Ionic info:
The text was updated successfully, but these errors were encountered: