Hi, I have a page with a couple of divs rendering content asynchronously in the initial page load.
I also have a filter at the top of the page that when clicked is supposed to refresh the contents.
= render 'shared/filter'
= render_async scores_path(filter: "overall"), container_class: "filterable_report" do
= render partial: 'loader'
= render_async metrics_path(filter: "overall"), container_class: "filterable_report" do
= render partial: 'loader'
When a different filter is selected, I would like to refresh the partial by making call to the url with the updated filter param. I think the best way to go about this is by refreshing the partials perhaps. But I am confused on how to update the params value itself. I am aware, I can pass the params like this as well.
= render_async scores_path, data: { filter: 'overall' } do
= render partial: 'loader'
So, is there a way to update the data or even the url when dispatching the refresh event? Thanks!
Hi, I have a page with a couple of divs rendering content asynchronously in the initial page load.
I also have a filter at the top of the page that when clicked is supposed to refresh the contents.
When a different filter is selected, I would like to refresh the partial by making call to the url with the updated filter param. I think the best way to go about this is by refreshing the partials perhaps. But I am confused on how to update the params value itself. I am aware, I can pass the params like this as well.
So, is there a way to update the data or even the url when dispatching the refresh event? Thanks!