Need to replace the entire block, not just the buttons in most cases
Fixes that closure notice was missing from views
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<div data-turbo-permanent>
|
||||
<%= turbo_frame_tag card, :edit do %>
|
||||
<%# When canceling an edit (with the ESC key), restore the button area to show "Edit" instead of "Save changes". %>
|
||||
<%= turbo_stream.update dom_id(card, :card_closure_toggle) do %>
|
||||
<%= render "cards/container/closure_buttons", card: card %>
|
||||
<%= turbo_stream.replace dom_id(card, :card_closure_toggle) do %>
|
||||
<%= render "cards/container/closure", card: card %>
|
||||
<% end %>
|
||||
|
||||
<%= render "cards/container/content_display", card: card %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%= turbo_frame_tag @card, :edit do %>
|
||||
<%# When entering edit mode, this turbo-stream replaces the button area to show
|
||||
<%# When entering edit mode, this turbo-stream updates the button area to show
|
||||
"Save changes" instead of "Edit". Turbo processes this stream as part of the
|
||||
frame response. %>
|
||||
<%= turbo_stream.update dom_id(@card, :card_closure_toggle) do %>
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
<%= render "cards/container/content_display", card: @card %>
|
||||
<% end %>
|
||||
|
||||
<%= turbo_stream.update dom_id(@card, :card_closure_toggle) do %>
|
||||
<%= render "cards/container/closure_buttons", card: @card %>
|
||||
<%= turbo_stream.replace dom_id(@card, :card_closure_toggle) do %>
|
||||
<%= render "cards/container/closure", card: @card %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user