Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The actions dropdown menu not visible in 1-row tables #21

Closed
iorien opened this issue May 30, 2023 · 8 comments
Closed

The actions dropdown menu not visible in 1-row tables #21

iorien opened this issue May 30, 2023 · 8 comments

Comments

@iorien
Copy link

iorien commented May 30, 2023

Steps to reproduce

Create a basic table with just one row. Like this one:

<div class="card">
  <h5 class="card-header">Table Basic</h5>
  <div class="table-responsive text-nowrap">
    <table class="table">
      <thead>
        <tr>
          <th>Project</th>
          <th>Client</th>
          <th>Users</th>
          <th>Status</th>
          <th>Actions</th>
        </tr>
      </thead>
      <tbody class="table-border-bottom-0">
        <tr>
          <td>
            <i class="fab fa-bootstrap fa-lg text-primary me-3"></i> <strong>Bootstrap Project</strong>
          </td>
          <td>Jerry Milton</td>
          <td>
            <ul class="list-unstyled users-list m-0 avatar-group d-flex align-items-center">
              <li data-bs-toggle="tooltip" data-popup="tooltip-custom" data-bs-placement="top" class="avatar avatar-xs pull-up" title="" data-bs-original-title="Lilian Fuller">
                <img src="../assets/img/avatars/5.png" alt="Avatar" class="rounded-circle">
              </li>
              <li data-bs-toggle="tooltip" data-popup="tooltip-custom" data-bs-placement="top" class="avatar avatar-xs pull-up" title="" data-bs-original-title="Sophia Wilkerson">
                <img src="../assets/img/avatars/6.png" alt="Avatar" class="rounded-circle">
              </li>
              <li data-bs-toggle="tooltip" data-popup="tooltip-custom" data-bs-placement="top" class="avatar avatar-xs pull-up" title="" data-bs-original-title="Christina Parker">
                <img src="../assets/img/avatars/7.png" alt="Avatar" class="rounded-circle">
              </li>
            </ul>
          </td>
          <td><span class="badge bg-label-warning me-1">Pending</span></td>
          <td>
            <div class="dropdown">
              <button type="button" class="btn p-0 dropdown-toggle hide-arrow" data-bs-toggle="dropdown" aria-expanded="false">
                <i class="bx bx-dots-vertical-rounded"></i>
              </button>
              <div class="dropdown-menu" style="">
                <a class="dropdown-item" href="javascript:void(0);"><i class="bx bx-edit-alt me-2"></i> Edit</a>
                <a class="dropdown-item" href="javascript:void(0);"><i class="bx bx-trash me-2"></i> Delete</a>
              </div>
            </div>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

What is expected?

On click the 3 dots menu I expected to see the distinct options:
image

What is actually happening?

But instead, the menu is hidden by the Overflow property:
image

Additional data

CSS

@iorien iorien added the support label May 30, 2023
@poojadosad
Copy link
Member

Hi @iorien,

Thanks for getting in touch with us :)

You are getting it while having a single row in tables. But users always use tables to manage multiple data, So there won't be any issue with multiple records.

If you still want to use it for only one row, you can customize the code for the same.

Let me know if you have any other queries.

@iorien
Copy link
Author

iorien commented Jun 1, 2023

Hi @poojadosad
It's true, but all tables start with a first row. I think for example in a list of orders, or a list of invoices or delivery notes, ... until the user does not have enough results it will look bad.

@poojadosad
Copy link
Member

Hi @iorien,

You can customize the code according to your needs.

For example, you can change the placement of the dropdown or update the z-index value etc.

Let me know if you have any other queries. :)

@iorien
Copy link
Author

iorien commented Jun 2, 2023

is not as simple as changing a z-index value...

@poojadosad
Copy link
Member

Hi @iorien,

The dropdown issue with the table can be resolved, if you remove .table-responsive class. But then the table will not be responsive.

This issue is with the Bootstrap itself, so we will raise an issue to resolve the bug.

Let me know if you have any other queries :)

@iorien
Copy link
Author

iorien commented Jun 6, 2023

yeah, this could be a solution 15 years ago, but today it is not realistic to create a non-responsive web solution.

@poojadosad
Copy link
Member

poojadosad commented Jun 7, 2023

Hi @iorien,

I apologize for the inconvenience. We also understand that it is not a proper solution to the issue.

But here is the solution, If adding a "position-relative" class to the "dropdown" class resolves the issue, you can apply it as code pen example here: https://codepen.io/Pooja-D/pen/rNQNYMo

If you have any further questions, feel free to let me know. :)

@iorien
Copy link
Author

iorien commented Jun 7, 2023

you mean position-static right? this way it works correctly. Thank you.

@iorien iorien closed this as completed Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants