Hotwire native - Dismiss modal and use redirect for screen below the modal

Hello, what is the best way to submit a form in a modal and then redirect the screen below the modal?

For example, I have a /customers route that renders in a default context. On it I have a link to /customers/filter that renders in a modal. This route renders a form form with action=/customers. When I submit that form the app stacks a new /customers?query=… scren on top of the initial /customers screen.

screen-recording

I haven’t tried this myself, but can you use presentation=replace to do that as described here? It sounds like it should do what you want.

Adding data-turbo-action="replace" actually works exactly as desired in my description. When I first tried it before I posted, I’ve made a typo so I thought it just doesn’t work. However, after trying it again I can see it works perfectly now.