Reloading Page from MainLayout #15109
Unanswered
CynthiaBlue
asked this question in
CLI - Electron mode
Replies: 1 comment 5 replies
-
I am still trying to find a solution to this problem. Anyone have any input? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a select in my main layout so the user can quickly navigate to a specific dog. This works great when the user is not on the dog details page (the destination of the input).
But if the user is still on the dog details page, and tries to go to a new dog, the dog details page doesn't reload.
This is my select that is on the main layout:
This is the method in the main layout that takes the user to the Dog Details page:
How do I make it so when a new dog is chosen in the select, the new dog details show on the page?
Apparently, neither the Created method nor the Mounted methods in the destination page (Dog Details) fire off when a new dog is selected and the user is still on the dog details page. So if I guess the $router.push doesn't really re-fire if the user is already on the destination page.
I figure if I can detect the changed dog, I can re-query the database to load the values for the new dog. But how do I run another query if I can't tell if a new dog has been selected? How do I pass a value from the main layout to the dog details page if nothing reloads? I don't really want to run the query from the main layout, but I guess I can if I have to.
This is a screenshot of where my select is:
Beta Was this translation helpful? Give feedback.
All reactions