my setting
I have a component which shows a data table.
The data can be filtered by entering stuff into fields which values are stored in the components props.
I also have vue-router in place to route between this and other components.
my desires
I want to share the state of my filtered table with some team member by providing an url for him or her.
When the url is accessed, the props get allocated the values from the url and voila I get the same list.
The parameters are not all needed everytome. So if I only filter by one of the fields, I will only need that param to pass in the url.
my questions
- How would I do this?
- And which pitfalls did't I see?
What I tried so far...
...was playing around with this.$router.push()
function by watch()
ing the props change; but I couldn't figure how to avoid the reloading of the page on the one hand and how to not adapt the server config on the other hand (as I want the route to work without any parameters as well).
I also dind't figure out so far how to define dynamic urls in the router config ... is there a way, or do you create aliases for every possible configuration, if you want to pass a different set of params every time?