Skip to content
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

Possible docs error for router.visit() #395

Open
kevindees opened this issue Feb 28, 2025 · 0 comments
Open

Possible docs error for router.visit() #395

kevindees opened this issue Feb 28, 2025 · 0 comments

Comments

@kevindees
Copy link

I think there is an error in the docs. In Vuejs, it seem like the data param is not present in the router.visit(), only options.

router.visit('/users', { search: 'John' }, { only: ['users'] })

I think it should be something like:

// Use router.get() to pass data
router.visit('/users', { data: { search: 'John' }, only: ['users'] });

https://github.com/inertiajs/inertiajs.com/blob/cdcedece84fb02ef1d3dc75ef253fc89f0dff822/resources/js/Pages/manual-visits.jsx#L866C1-L867C1

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

No branches or pull requests

1 participant