From 1271c56e79d88ba1f893727b257d8e54029a3f9a Mon Sep 17 00:00:00 2001 From: "nida.ghuman" Date: Wed, 20 Nov 2024 09:54:03 -0500 Subject: [PATCH] Dropdown rails to have postion absolute on container --- playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss | 1 + .../playbook/pb_dropdown/dropdown_container.html.erb | 6 ++---- .../app/pb_kits/playbook/pb_dropdown/dropdown_container.rb | 4 ---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss b/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss index f769bd112a..c097443b8d 100644 --- a/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +++ b/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss @@ -53,6 +53,7 @@ } .pb_dropdown_container { + position: absolute; background-color: $white; overflow: hidden; box-shadow: $shadow_deep; diff --git a/playbook/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb b/playbook/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb index b139446f3a..92f67e0165 100644 --- a/playbook/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +++ b/playbook/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb @@ -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 %> diff --git a/playbook/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb b/playbook/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb index dc0f44deab..5d5579dc4f 100644 --- a/playbook/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +++ b/playbook/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb @@ -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