-
-
Notifications
You must be signed in to change notification settings - Fork 457
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
Page is not reloaded when using router.reload
with preserveUrl: true
option
#2162
Comments
I am also experiencing this when using only with usePoll. It doesn't refresh the page.props even if the new values are received from the backend. Removing the preserverUrl fixes the issue but it should work with it. |
Yep I was having tremendous issues with the new WhenVisible component and I finally figured out that this was the issue, preserveUrl stops the props from refreshing (or merging in my case) |
Same issue here, |
#2135 will address this issue, hopefully the team is able to merge and release it soon. |
#2163 is merged. I will close this issue. |
Versions:
@inertiajs/core
version: 2.0.0@inertiajs/vue3
version: 2.0.0Describe the problem:
When invoking
router.reload
with the option{ preserveUrl: true }
, the page does not reload as expected, even though network requests are performed successfully. This behaviour appears to conflict with the expected outcome when usingpreserveUrl
.Steps to reproduce:
router.reload
method.Suspected Cause:
The issue seems related to how the page is set in page.set within the core package. Specifically:
history.replaceState
orhistory.pushState
, depending on the circumstances.preserveUrl
option and terminate early without proceeding further:The callback function (
cb
) associated with the promise does not appear to be invoked whenpreserveUrl
is set to true. This might prevent the expected resolution of the reload logic.Suggested Solution:
Verify and adjust the callback handling logic in the page.set process:
cb
is invoked even whenpreserveUrl
istrue
.The text was updated successfully, but these errors were encountered: