-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat(vue-app): trigger watchParam when param is changed in same route #6244
Conversation
356e154
to
f8b8009
Compare
It was on purpose to call I like the idea of introducing |
@atinux According to Current behaviour is:
I don't think it's a correct behaviour, with the current pr, behaviour is:
What do you think ? |
I agree with the behaviour you describe, but we have to keep in mind about the Parent -> Child calls too,
|
007c785
to
a84f31d
Compare
@atinux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve but missing the docs PR :)
Types of changes
Description
Try to resolve #6235 , need more discussion.
Currently when dynamic path is changed (it means same route: like /test1 -> /test2 under /:test), we will always call asyncData instead of reusing, I'm not sure it this is in purpose @atinux @pi0 .
After the pr, asyncData will be called in client side when:route is changed (checking by from.name !=== to.name)route is not change, but param is changed and watchQuery is trueroute is not change, but query is changed and watchQuery is trueIf current behaviour is correct and by design, how do you think adding awatchParam
and make default value astrue
which means by default always calling asyncData when changing slug path.I've changed this pr for adding
watchParam
Behaviour after this pr:
watchParam
is false,not
call asyncData of childnot
call asyncDataChecklist: