-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
[1.1.0] Partial reload sets all $page props to undefined #1883
Comments
Hey! I just tried to reproduce this issue and wasn't able to. Both the page props passed to the page component, as well as the You can see my test here: https://github.com/inertiajs/inertia/blob/issue-1883/playgrounds/vue3/resources/js/Pages/Users.vue We did recently make some changes to how partial reloads work (see #1876 and #1877), so it's entirely possible that there is some situation we didn't account for, but I am unable to reproduce it. Are you able to provide a minimal reproduction of this issue using this Vue 3 playground? |
Will create a playground later today 😃 Thanks for your quick response! |
Awesome, thanks! |
Unfortunately, I can't reproduce it on your playground (maybe, because we rely heavily on nested layouts with parameters?), but I found our mistake: On our reload call router.reload({ only: ['some-prop'] });
inertia('Page', array_merge([], $active ? [
'some-prop' => 'value',
] : [
// missing
])) On I'm unsure if it is a bug in the new version if inertia or some weird hack on our codebase. |
Hey I think we've fixed this now in v1.2.0 👍 |
@reinink Testet it. Works as before. Thanks 😄 |
Version:
@inertiajs/vue3
version: 1.1.0Describe the problem:
When updating from 1.0.6 to 1.1.0 unexpectedly the behavior of $page props has changed. It will set all page props to undefined when a partial reload with only is called.
Steps to reproduce:
The user page prop is now undefined! It affects not only props in templates but also when usePage() is used.
The text was updated successfully, but these errors were encountered: