Skip to content

Commit

Permalink
Dropdown rails to have postion absolute on container
Browse files Browse the repository at this point in the history
  • Loading branch information
nidaqg committed Nov 20, 2024
1 parent 251118d commit 1271c56
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
}

.pb_dropdown_container {
position: absolute;
background-color: $white;
overflow: hidden;
box-shadow: $shadow_deep;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<%= content_tag(:div,
<%= pb_content_tag(:div,
aria: object.aria,
class: object.classname,
data: object.data,
id: object.id,
style: object.container_style,
**combined_html_options) do %>
id: object.id) do %>
<%= pb_rails("list", props: {ordered: false, borderless: false}) do %>
<% if content.present? %>
<%= content.presence %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ def classname
generate_classname("pb_dropdown_container", "close", separator: " ")
end

def container_style
"position: absolute"
end

def data
Hash(prop(:data)).merge(dropdown_container: true)
end
Expand Down

0 comments on commit 1271c56

Please sign in to comment.