Skip to content

Commit

Permalink
fix: firefox record selection persists on reload & firefox row border (
Browse files Browse the repository at this point in the history
…#2065)

* fix: firefox record selection persists on reload

* fix actions_spec

* remove relative from tr to fix firefox row border-b render

* try loading action

* action for no confirmation redirect test
  • Loading branch information
Paul-Bob authored Dec 4, 2023
1 parent 443e9bc commit 3cc41a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/avo/index/table_row_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%# hover:z-[21] removed from tr class to solve flickering actions component on row controls and z-20 changed to z-21%>
<tr
class="bg-white hover:bg-gray-50 hover:shadow-row relative z-21 border-b"
class="bg-white hover:bg-gray-50 hover:shadow-row z-21 border-b"
data-component-name="<%= self.class.to_s.underscore %>"
<%== item_selector_init @resource %>
data-resource-name="<%= @resource.class.to_s %>"
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/avo/resources_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def item_selector_input(floating: false, size: :md)
type: "checkbox",
name: t("avo.select_item"),
title: t("avo.select_item"),
autocomplete: :off,
class: "mx-3 rounded checked:bg-primary-400 focus:checked:!bg-primary-400 #{floating ? "absolute inset-auto left-0 mt-3 z-10 hidden group-hover:block checked:block" : ""} #{size.to_sym == :lg ? "w-5 h-5" : "w-4 h-4"}",
data: {
action: 'input->item-selector#toggle input->item-select-all#selectRow',
Expand All @@ -59,6 +60,7 @@ def item_select_all_input
type: "checkbox",
name: t("avo.select_all"),
title: t("avo.select_all"),
autocomplete: :off,
class: "mx-3 rounded w-4 h-4 checked:bg-primary-400 focus:checked:!bg-primary-400",
data: {
action: "input->item-select-all#toggle",
Expand Down

0 comments on commit 3cc41a3

Please sign in to comment.