saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.14k stars 1.3k forks source link

bug: Dropdown overlapped by table header #3111

Closed gitmalong closed 1 month ago

gitmalong commented 4 months ago

What version of daisyUI are you using?

4.12.10

Which browsers are you seeing the problem on?

No response

Reproduction URL

-

Describe your issue


 <table class="table table-xs table-zebra table-pin-cols table-pin-rows mt-2">
<thead>
    <tr>
        <th>"Date"</th>
        <th>
            <div class="dropdown dropdown-bottom">

                Col 1

                <ul
                      tabindex="0"
                      class="dropdown-content menu p-0 z-10 shadow bg-base-100 rounded-box w-52"
                  >
                      <li>
                          <a>
                              <label class="label cursor-pointer">
                                      Some dropdown content
                              </label>
                             </a>
                        </li>
                   </ul>

            </div>
        </th>
    </tr>
</thead>
</table>

Example: image

github-actions[bot] commented 4 months ago

Thank you @gitmalong for reporting issues. It helps daisyUI a lot ๐Ÿ’š
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

twschum commented 3 months ago
Screenshot 2024-08-08 at 1 54 01 PM

I have also reproduced this problem, where table headings are on top of a nav dropdown. The navbar and dropdown are outside the table element.

KozSuper commented 1 month ago

image

The dropdown is being covered by the table. i tried z-index but not working

saadeghi commented 1 month ago

@KozSuper My friends, thanks for the issue and follow up comments.
We need a reproduction link to see the problem in action. I don't see the issue in the original provided code, and screenshot is not helpful since there's no way for me to guess what's the code you used for it.

Here's a working example: https://play.tailwindcss.com/q4zUojS1Qu

I'll close this for now, but feel free to reopen once you can provide a reproduction link. Thanks!

KozSuper commented 1 month ago

when a dropdown is inside a div with transform, it will behave like this.

https://play.tailwindcss.com/NJPASKLtKE

leouie28 commented 3 weeks ago

I have this error when i add dropdown inside a table.

https://play.tailwindcss.com/jaw5gLJBnA

saadeghi commented 3 weeks ago

@leouie28 overflow-x-auto class is causing that.
This will be fixed in the upcoming daisyUI 5 release by using the new HTML popover API for dropdowns.