PrimeNG filter dropdown issue in scrollable turbo table
Asked Answered
P

3

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.

Porphyrin answered 21/8, 2018 at 4:46 Comment(7)
try to set z-index to dropdownUnsuitable
z-index is already applied but not works. you can refer here primefaces.org/primeng/#/table/filterPorphyrin
but as i see in this example it is responsive....I mean they do not give the option the table to be scrollableUnsuitable
but I have so many fields in the table so my table has scroll.Porphyrin
try to increase the value of z-index and to se position relative/absoluteUnsuitable
I have done all the stuff but not working.Porphyrin
it will be easy to help you if you put your code here and after save post the link:stackblitz.com/edit/primeng-tableUnsuitable
M
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

Manus answered 21/2, 2019 at 8:23 Comment(0)
P
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!

Pelt answered 18/10, 2018 at 9:39 Comment(0)
N
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

Nitrate answered 6/2, 2020 at 8:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.