Skip to content

Commit

Permalink
Keep turbo frame, but dont tell it which one to update
Browse files Browse the repository at this point in the history
  • Loading branch information
forsbergplustwo committed Dec 1, 2023
1 parent 75daebf commit 1695580
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/metrics/_filter.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%= form_tag(
url_for(action: action_name, charge_type: filter.charge_type),
method: :get,
data: {controller: "filters"},
data: {controller: "filters", turbo_action: :advance},
) do %>

<%= hidden_field_tag :chart, filter.chart %>
Expand Down
3 changes: 2 additions & 1 deletion app/views/metrics/_forecasts_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
data: {
controller: "submittable",
submittable_target: "form",
action: "change->submittable#submit"
action: "change->submittable#submit",
turbo_action: :advance
}
) do |form| %>

Expand Down
3 changes: 3 additions & 0 deletions app/views/metrics/_tile.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
content: polaris_icon(name: "ViewMinor", color: :subdued),
title: "View chart",
url: url_for(action: action_name, **filter.to_param.merge(chart: tile.handle)),
data: {
turbo_action: "advance",
},
}]
) do %>
<%= polaris_stack(alignment: :center) do |stack| %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/metrics/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<%= render "shared/page_actions", page: page %>

<%= tag.div data: { controller: "loading" } do %>
<%= turbo_frame_tag :metrics, data: { controller: "loading" } do %>

<%= polaris_vertical_stack(gap: "6") do %>

Expand Down

0 comments on commit 1695580

Please sign in to comment.