The personal finance app for everyone
Fix bulk editing
Zach Gollwitzer2e0794b8e164
diff --git a/app/components/dialog_component.rb b/app/components/dialog_component.rbindex 97788691..94246872 100644--- a/app/components/dialog_component.rb+++ b/app/components/dialog_component.rb@@ -43,21 +43,26 @@ class DialogComponent < ViewComponent::Basefull: "lg:max-w-full"}.freeze- def initialize(variant: "modal", auto_open: true, reload_on_close: false, width: "md", disable_frame: false, **opts)+ def initialize(variant: "modal", auto_open: true, reload_on_close: false, width: "md", frame: nil, disable_frame: false, **opts)@variant = variant.to_sym@auto_open = auto_open@reload_on_close = reload_on_close@width = width.to_sym+ @frame = frame@disable_frame = disable_frame@opts = optsend+ def frame+ @frame || variant+ end+# Caller must "opt-out" of using the default turbo-frame based on the variantdef wrapper_element(&block)if disable_framecontent_tag(:div, &block)else- content_tag("turbo-frame", id: variant, &block)+ content_tag("turbo-frame", id: frame, &block)endend