Skip to content

Reset pending changes on viewer page change #2070

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dsuren1
Copy link

@dsuren1 dsuren1 commented May 21, 2025

Description

This PR addresses the issue where pending changes were retained when navigating away from the page causing unwanted side effects

@dsuren1 dsuren1 added this to the 5.0.0 milestone May 21, 2025
@dsuren1 dsuren1 requested a review from allyoucanmap May 21, 2025 05:43
@dsuren1 dsuren1 self-assigned this May 21, 2025
@dsuren1 dsuren1 added bug Something isn't working master geonode-ui labels May 21, 2025
initStyleService(),
resetStyleEditor()
];
const getResetActions = (state, isSameResource) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

get action is used multiple times in this code so before was assuming isSameResource as for argument. Shouldn't we review also other places where getResetActions is used?

Copy link
Author

Choose a reason for hiding this comment

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

getResetActions is used in other scenarios that require a full reset—such as creating a new resource or handling an error—where the resource is not the same. The only case where the isSameResource argument is needed is when loading an existing resource

@dsuren1 dsuren1 requested a review from allyoucanmap May 21, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working geonode-ui master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants