3

In prime-ng turbo table , when we put filter dropdown in scrollable table dropdown going inside the table

Without scrollbale table dropdown works perfect. This works perfect

but when scrollable table , dropdown is going inside the table Not works perfect. so I want to do dropdown outside the table not inside the table.

This is a link https://primeng-table-bry1sl.stackblitz.io/ to see the code. Please see in 1024 resolution so you can see the scroll in the table and select one of the brand to filter the data.

Can anyone help me.

ankita patel
  • 4,201
  • 1
  • 13
  • 28

3 Answers3

4

Try to use appendTo="body" attribute available on dropdown of Primeng, which might be helpful in your case.

Complete example here -

<p-dropdown appendTo='body' [options]="value" [style]="{'width':'100%'}" placeholder="Select"></p-dropdown>

Reference from here

Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215
developer
  • 521
  • 1
  • 5
  • 21
0

The problem is here:

.ui-table-resizable .ui-table-thead>tr>th, .ui-table-resizable .ui-table-tfoot>tr>td, .ui-table-resizable .ui-table-data>tr>td {
    /* overflow: hidden; */
}

Try to comment the overflow attribute or set to visible ... it works!

Kiran Mistry
  • 2,614
  • 3
  • 12
  • 28
Ray
  • 1
  • 1
0

Solved by overwriting the below overflow to be visible:

//Old code in primeng.min.css
    .ui-table-scrollable-header, .ui-table-scrollable-footer {
        **overflow: hidden;**
        border: 0 none;
    }
//add this to your stylesheet instead
    .ui-table-scrollable-header, .ui-table-scrollable-footer {
        **overflow: visible;!important**
        border: 0 none;
    }

Also, add this in your stylesheet after the code above:

.ui-table-scrollable-view {
  overflow: hidden!important;
}

see here result image

H K
  • 3
  • 2