Skip to content

Commit 6ae5f91

Browse files
authored
Add and remove classes to fix dropdown positioning issues (#304)
1 parent 81eedb3 commit 6ae5f91

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/ruby_ui/dropdown_menu/dropdown_menu.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def view_template(&)
1616
def default_attrs
1717
{
1818
class: [
19+
"z-50",
1920
"group/dropdown-menu",
2021
(strategy == "absolute") ? "is-absolute" : "is-fixed"
2122
],

lib/ruby_ui/dropdown_menu/dropdown_menu_content.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def default_attrs
1515
data: {
1616
state: :open
1717
},
18-
class: "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 w-56"
18+
class: "z-50 min-w-[8rem] rounded-md border bg-background p-1 text-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 w-56"
1919
}
2020
end
2121

0 commit comments

Comments
 (0)