-
Notifications
You must be signed in to change notification settings - Fork 174
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
Fix preserve views node params #349
Fix preserve views node params #349
Conversation
core/src/App.html
Outdated
@@ -115,8 +115,10 @@ | |||
if (data.params.preserveView) { | |||
const pv = component.get().preservedViews; | |||
const nextPath = buildPath(component, data.params); | |||
const pathUrlRaw = component.get().pathUrlRaw; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The solution works well 👍
I can see you're calling component.get()
multiple times. Wouldn't it be better to use
const {pathUrlRaw, preservedViews, currentNode} = component.get();
I'm not sure but there might be also a performance advantage for this approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this suggestion!
core/src/services/routing.js
Outdated
@@ -236,6 +237,7 @@ export const handleRouteChange = async (path, component, node, config) => { | |||
pathParams, | |||
isolateView, | |||
viewGroup, | |||
pathUrlRaw, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the only thing we are doing with patUrlRaw
is extract the url params in App.html, why don't we just save the url params instead?
Fixes preserve views node params
Description
Changes proposed in this pull request:
Related issue(s)
Fixes : #337