-
Notifications
You must be signed in to change notification settings - Fork 898
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
Add navigation guards to liveSocket #3051
Draft
SteffenDE
wants to merge
9
commits into
phoenixframework:main
Choose a base branch
from
SteffenDE:navigation_callbacks
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Commits on Feb 5, 2024
-
This PR introduces a new option that can be specified when creating a
livesocket instance: `navigation`. Navigation is an object that can define two functions: `beforeEach` and `afterEach`. The `beforeEach` function is called before each navigation event and can for example be used to store custom scroll positions. If the `beforeEach` function returns `false`, the navigation will be aborted. This can be used to implement a warning when the user tries to navigate while a form is still being edited. The `afterEach` function is called after a navigation event has been completed. It can be used to restore the scroll position that was stored in the `beforeEach` function.
Configuration menu - View commit details
-
Copy full SHA for 46b0a70 - Browse repository at this point
Copy the full SHA 46b0a70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62665f5 - Browse repository at this point
Copy the full SHA 62665f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b41f8b - Browse repository at this point
Copy the full SHA 6b41f8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a1d8224 - Browse repository at this point
Copy the full SHA a1d8224View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa08491 - Browse repository at this point
Copy the full SHA aa08491View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0152e0f - Browse repository at this point
Copy the full SHA 0152e0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 68b88e5 - Browse repository at this point
Copy the full SHA 68b88e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03fb8bf - Browse repository at this point
Copy the full SHA 03fb8bfView commit details
Commits on Feb 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4cb9264 - Browse repository at this point
Copy the full SHA 4cb9264View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.