diff --git a/app/components/avo/panel_component.rb b/app/components/avo/panel_component.rb index c725d49b4..2774450ac 100644 --- a/app/components/avo/panel_component.rb +++ b/app/components/avo/panel_component.rb @@ -37,6 +37,6 @@ def classes private def data_attributes - @data.merge({"panel-index": @index}) + @data.merge(component: @data[:component] || self.class.to_s.underscore, "panel-index": @index) end end diff --git a/lib/avo/concerns/has_resource_stimulus_controllers.rb b/lib/avo/concerns/has_resource_stimulus_controllers.rb index c8b8bf0f3..4b7ac7fed 100644 --- a/lib/avo/concerns/has_resource_stimulus_controllers.rb +++ b/lib/avo/concerns/has_resource_stimulus_controllers.rb @@ -23,7 +23,7 @@ def get_stimulus_controllers controllers << self.class.stimulus_controllers - controllers.join " " + controllers.reject(&:blank?).join " " end def stimulus_data_attributes diff --git a/spec/system/avo/date_time_fields/date_time_spec.rb b/spec/system/avo/date_time_fields/date_time_spec.rb index 67a558544..a9daa2d31 100644 --- a/spec/system/avo/date_time_fields/date_time_spec.rb +++ b/spec/system/avo/date_time_fields/date_time_spec.rb @@ -197,6 +197,7 @@ close_picker save + wait_for_loaded expect(show_field_value(id: :started_at)).to eq "January 02, 2000 17:17:17 UTC" end @@ -256,6 +257,7 @@ close_picker save + wait_for_loaded expect(show_field_value(id: :started_at)).to eq "January 02, 2000 17:17:17 UTC" end