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

New feature - replaceState #11

Open
m0jimo opened this issue Jan 25, 2023 · 0 comments
Open

New feature - replaceState #11

m0jimo opened this issue Jan 25, 2023 · 0 comments

Comments

@m0jimo
Copy link

m0jimo commented Jan 25, 2023

This library is great help for navigation within SharePoint site. I've been using it for my SPFx extension, where I'm checking the URL and if the user is allowed to land there or not.

Now you library keeps the history, which is problematic when you don't want to let user come back to the page he was navigated away.

Would you consider adding a new property for replace|push the URL to the browsers history?

 // Adds the new navigation state to the browser history
 // history.pushState(navState, null, link); // keep the last URL - original
 history.replaceState(navState, null, link); //  do not leave it in history - my case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant