[Maps] Fix saved object (map) switching issue#112001
[Maps] Fix saved object (map) switching issue#112001kindsun merged 10 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-gis (Team:Geo) |
|
@elasticmachine merge upstream |
|
Thanks for finding this issue and putting up a fix. There is actually a much easier solution that will avoid adding additional componentDidUpdate and getDerivedStateFromProps checks. In https://github.com/elastic/kibana/blob/master/x-pack/plugins/maps/public/render_app.tsx#L95, just add the line |
👍 Easier sounds good, thanks! I'll give this a shot |
db067f2 to
62b8d65
Compare
nreese
left a comment
There was a problem hiding this comment.
LGTM
code review, tested in chrome.
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
* Add key to MapPage
* Add key to MapPage
Currently trying to switch between recently viewed maps doesn't actually change maps:
The URL changes and a routing event is detected by the Maps app, but the saved object isn't actually loaded and no state is applied. This was discovered while working on #111195 which requires navigation between saved objects in case of a conflict.
This PR just forces react to generate a new map page if a new map saved object id is passed through.