Within my Vue application, I have implemented a series of filters that generate a query string when selected and attach it to the URL. My goal is to have these filters applied, refresh the data, and maintain the current state so that users can continue adding filters without having the modal close unexpectedly. Initially, I believed using the only
property would accomplish this task, but unfortunately, it did not work as expected as the page still loses its state. Here are the approaches I have tried:
Although this method prevents the modal from closing, it does not update the data.
this.$inertia.visit(url, { preserveState: true })
This successfully updates the data, but fails to maintain the state as if the
preserveState
option is being disregarded (causing the modal to close).... props: ['data'], ... this.$inertia.visit(url, { preserverState: true, only: ['data'] })
Is there another approach or custom option available to achieve this functionality without losing the current state?