-
Notifications
You must be signed in to change notification settings - Fork 526
Closed
Labels
reactRelated to the react adapterRelated to the react adapter
Description
Version:
@inertiajs/react
version: 2.0.11
Describe the problem:
The queryStringArrayFormat
option on both the router.get()
and router.reload()
doesn't work as expected. It encodes the brackets, but I expect them to remain as normal (decoded) brackets.
When I do this:
router.reload({
data: {
random_array: ['test123', 'test213', 'dsadsa'],
},
queryStringArrayFormat: 'brackets',
});
I expect the URI to look like this:
/dashboard?random_array[0]=test123&random_array[1]=test213&random_array[2]=dsadsa
But instead it looks like this:
/dashboard?random_array%5B0%5D=test123&random_array%5B1%5D=test213&random_array%5B2%5D=dsadsa
Steps to reproduce:
- Add a
router.reload()
orrouter.get()
call with thequeryStringArrayFormat
option set to "brackets". - Call the function.
- See that the URI in the browser contains encoded brackets instead of normal (decoded) brackets.
I am aware that there is already an issue open related to this (inertia/issues/1709), but this is on Inertia version 1.
Metadata
Metadata
Assignees
Labels
reactRelated to the react adapterRelated to the react adapter