Can Turbo.visit update a turbo frame when onChange changes, without changing the URL?

1.7k Views Asked by At

Inside a form we have 2 select and would like to refresh/update the second select when the first select changes, using onChange

Example:

First select has:

onChange:"Turbo.visit(`/sites/index_by_country?country_id=${this.value}`)"

Currently this works, but Turbo.visit updates the URL also - which we don't want. We only want the frame to update (which it does) and not update the URL.

Or should we be using a different approach?

0

There are 0 best solutions below