inertia
inertia copied to clipboard
Behaviour replace not working using router.reload when query String Array Format is set as 'indices'
Version:
-
@inertiajs/vue3
version: 1.0.7
Describe the problem:
Behaviour replace not working using router.reload when query String Array Format is set as 'indices'
Steps to reproduce:
I have this code
router.reload({
data: {
filters: [{field: 'category_id', operator: '=', value: categoryId}]
},
queryStringArrayFormat: 'indices',
replace: true,
})
but is adding new query params instead replace when execute the same code multi times.
Expected:
?filters[][field]=category_id&filters[][operator]=%3D&filters[][value]=2
Current:
?filters[][field]=category_id&filters[][operator]=%3D&filters[][value]=2&filters[][field]=category_id&filters[][operator]=%3D&filters[][value]=3
Can confirm this is happening on my side as well. I don't think the queryStringArrayFormat
impacts that in any way. I have the same results using both brackets
and indices
Me too
same thing for me