You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there's a problem when merging query string params when dealing with arrays on nested props.
For example:
this.$inertia.reload({data: {filter: {created_between: ["2021-07-12"]// The next request should be sent without this filtersearch: nullupdated_between: nullpage: 1per_page: 15}}})
If I try to reload the page again, but without the created_between filter, like this:
this.$inertia.reload({data: {filter: {created_between: []// Created between removedsearch: nullupdated_between: nullpage: 1per_page: 15}}})
Inertia is merging the params but the created_between filter ends up with the old value.
I assume this is expected since it was merge here.
But I believe we should have some way of dealing with this automatically, but I'm not sure if it's possible.
Some way to prevent merging arrays... I'm not sure...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I believe there's a problem when merging query string params when dealing with arrays on nested props.
For example:
If I try to reload the page again, but without the
created_between
filter, like this:Inertia is merging the params but the
created_between
filter ends up with the old value.I assume this is expected since it was merge here.
But I believe we should have some way of dealing with this automatically, but I'm not sure if it's possible.
Some way to prevent merging arrays... I'm not sure...
Beta Was this translation helpful? Give feedback.
All reactions