Skip to content
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

Merged

Conversation

dariadomagala-sap
Copy link
Contributor

@dariadomagala-sap dariadomagala-sap commented Jan 15, 2019

Description

Changes proposed in this pull request:

  • Fix preserve views node params

Related issue(s)
Fixes : #337

@@ -115,8 +115,10 @@
if (data.params.preserveView) {
const pv = component.get().preservedViews;
const nextPath = buildPath(component, data.params);
const pathUrlRaw = component.get().pathUrlRaw;
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this suggestion!

@jesusreal jesusreal self-assigned this Jan 16, 2019
@@ -236,6 +237,7 @@ export const handleRouteChange = async (path, component, node, config) => {
pathParams,
isolateView,
viewGroup,
pathUrlRaw,
Copy link
Contributor

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?

@maxmarkus maxmarkus merged commit 6fd1ad5 into SAP:master Jan 21, 2019
@maxmarkus maxmarkus deleted the fix-preserve-views-node-params branch January 21, 2019 14:07
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
Fixes preserve views node params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node parameters get removed from the url when using go back
4 participants