inertiajs / inertia

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
https://inertiajs.com
MIT License
6.3k stars 423 forks source link

Send Select without a form with GET method not working... React #1777

Closed vitalijalbu closed 3 months ago

vitalijalbu commented 8 months ago

Version:

Describe the problem:

Please see here description: https://github.com/inertiajs/inertia/discussions/1774

derrickreimer commented 3 months ago

Hey @vitalijalbu! I think you can get by without using the useForm hook here. I'd recommend just navigating the page in the onChange hook for your select, rather than setting form state and subsequently triggering navigation. Simplified example:

<select value={props.filters.order_by} onChange={(e) => router.get("/page", { order_by: e.target.value })}>