1 year ago
#326179
viktorsmari
Can Turbo.visit update a turbo frame when onChange changes, without changing the URL?
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?
ruby-on-rails
hotwire-rails
turbo-rails
0 Answers
Your Answer