Replies: 1 comment 1 reply
-
Hello. You could use If you want to reload the table content you could use Something like: def handle(**args)
succeed "Modal closed!!"
close_modal
append_to_response -> {
turbo_stream.turbo_frame_reload(the_turbo_frame)
}
end Let us know how it goes |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On a show page with a has_many association, you can filter the has_many records. For example if a company has_many customers and I'm on the company page with a
has_many :customers
field, I could filter the customers by name. Then, I might run an action on the filtered customers. When I finish running the action, the page reloads and the customers filters are reset.I believe the filters get reset because
Avo::ActionsController
is redirecting to the request referrer.avo/app/controllers/avo/actions_controller.rb
Lines 131 to 135 in c60e854
The filter params would be in the
has_many_field_show_customers
turbo frame as the src, but the request referrer is/resources/company/42
which has no information about the turbo frame. If we could pass the turbo frame information to the action, couldAvo::ActionsController#respond
refresh the turbo frame instead of reloading the whole page? Then, the turbo frame would have its filters in place.Or is there another way to keep the filter params around? In our app we do a lot of filtering and data updates, and losing the filters is a bummer.
Beta Was this translation helpful? Give feedback.
All reactions