Skip to content

Conversation

pascalbaljet
Copy link
Member

Just like regular visits, you may pass errors (as a string) or a callback to the preserveScroll and preserveState options of Client Side Visits. With regular visits, this will be resolved based on the page props from the response (see RequestParams.resolvePreserveOption()). This PR makes sure this also happens on Client Side Visits.

router.push({
  url: '/users',
  component: 'Users',
  props: { errors: {} },
  preserveScroll: 'errors',
  preserveState: 'errors',
})

This was originally planned in PR #2549, but I decided to split it up into multiple PRs for clarity.

@pascalbaljet pascalbaljet merged commit efe5193 into master Oct 15, 2025
12 checks passed
@pascalbaljet pascalbaljet deleted the client-side-visit-preserve-state-fix branch October 15, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant