diff --git a/admin/app/components/solidus_admin/orders/index/component.html.erb b/admin/app/components/solidus_admin/orders/index/component.html.erb index 17d95a59fbd..6539a00b9e7 100644 --- a/admin/app/components/solidus_admin/orders/index/component.html.erb +++ b/admin/app/components/solidus_admin/orders/index/component.html.erb @@ -5,7 +5,6 @@
- <%= render component("feedback").new %> <%= render component("ui/button").new( tag: :a, text: t('.create_order'), diff --git a/admin/app/components/solidus_admin/orders/new/component.html.erb b/admin/app/components/solidus_admin/orders/new/component.html.erb index 37a13c33309..350c9362d24 100644 --- a/admin/app/components/solidus_admin/orders/new/component.html.erb +++ b/admin/app/components/solidus_admin/orders/new/component.html.erb @@ -5,7 +5,6 @@ <%= page_header_title t(".create_order") %> <%= page_header_actions do %> - <%= render component("feedback").new %> <%= render component("ui/button").new(tag: :button, scheme: :secondary, text: t(".discard"), form: form_id) %> <%= render component("ui/button").new(tag: :button, text: t(".save"), form: form_id) %> <% end %> diff --git a/admin/app/components/solidus_admin/products/index/component.html.erb b/admin/app/components/solidus_admin/products/index/component.html.erb index b35b6ff4fb4..5eee57b7229 100644 --- a/admin/app/components/solidus_admin/products/index/component.html.erb +++ b/admin/app/components/solidus_admin/products/index/component.html.erb @@ -2,7 +2,6 @@ <%= page_header do %> <%= page_header_title title %> <%= page_header_actions do %> - <%= render component("feedback").new %> <%= render component("ui/button").new( tag: :a, text: t('.add_product'), diff --git a/admin/app/components/solidus_admin/ui/table/component.js b/admin/app/components/solidus_admin/ui/table/component.js index 6a517b13972..0c925621f85 100644 --- a/admin/app/components/solidus_admin/ui/table/component.js +++ b/admin/app/components/solidus_admin/ui/table/component.js @@ -45,6 +45,11 @@ export default class extends Controller { this.searchFormTarget.requestSubmit() } + clearSearch() { + this.searchFieldTarget.value = '' + this.search() + } + cancelSearch() { this.clearSearch() diff --git a/admin/app/components/solidus_admin/ui/table/toolbar/component.rb b/admin/app/components/solidus_admin/ui/table/toolbar/component.rb index 70e287ef759..58c6d5f2ca2 100644 --- a/admin/app/components/solidus_admin/ui/table/toolbar/component.rb +++ b/admin/app/components/solidus_admin/ui/table/toolbar/component.rb @@ -1,14 +1,21 @@ # frozen_string_literal: true class SolidusAdmin::UI::Table::Toolbar::Component < SolidusAdmin::BaseComponent - erb_template <<~ERB -
- <%= content %> -
- ERB + def initialize(**options) + @options = options + end + + def call + tag.div( + content, + **@options, + class: " + h-14 p-2 bg-white border-b border-gray-100 + justify-start items-center gap-2 + visible:flex hidden:hidden + rounded-t-lg + #{@options[:class]} + " + ) + end end