primeng icon indicating copy to clipboard operation
primeng copied to clipboard

p-dropdown doesn't work in header of datatable when table is scrollable

Open cqzheng opened this issue 9 years ago • 17 comments

Make the column [filter]="true", add template with p-dropdown for filter and add style style="overflow:visible". It works correctly. But if add scrollable="true" to the datatable, the list of p-dropdown doesn't show correclty. The overflow part is hidden. Did some debugging and found that a div with class ui-datatable-scrollable-header to wrapper table header is added when specify scrollable="true". Class ui-datatable-scrollable-header just set style "overflow:hidden". Thus p-dropdown doesn't work. The style="overflow:visible" can not passed to the div. There must be conflict of scrollable and custom filter.

cqzheng avatar Mar 23 '17 11:03 cqzheng

Same problem with p-calendar.

sliekens avatar Mar 28 '17 06:03 sliekens

hi ,

Same problem i was facing in past. appendTo='bpdy' worked for me. example: <p-column [style]="{'width':'150px','overflow':'visible'}" field="CTNStatus" header="Status" [filter]="true" filterMatchMode="equals">

        <!--<template let-col let-model="rowData" pTemplate="body">
            <span> {{model[col.field]}}</span>
            <span>{{model["ChangedCTNStatusDate"]}}</span>
        </template>-->
    </p-column>

On Tue, Mar 28, 2017 at 12:24 PM, Steven Liekens [email protected] wrote:

Same problem with p-calendar.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/primefaces/primeng/issues/2368#issuecomment-289680269, or mute the thread https://github.com/notifications/unsubscribe-auth/AQcllsY31EtoNQJuOwapSb3voDo_u8Oxks5rqK6JgaJpZM4MmnzJ .

rohitsindhu90 avatar Mar 28 '17 07:03 rohitsindhu90

@rohitsindhu90 thanks for the solution. This saved my time 👍

mukeshkamboj avatar Apr 09 '17 03:04 mukeshkamboj

@rohitsindhu90 Thanks for that quick solution. 👍 🥇

bimalpaul avatar Apr 25 '17 15:04 bimalpaul

Thanks saved the day

unaor avatar Apr 26 '17 20:04 unaor

appendTo="body"

@rohitsindhu90 nailed it

RebelSyntax avatar May 05 '17 15:05 RebelSyntax

Use appendTo body please.

cagataycivici avatar Jun 20 '17 20:06 cagataycivici

Sorry for posting to a closed issue, but it would be great if infos like these would be linked on your showcase/example page.

Would have saved me much time tinkering around aswell as it will for future visitors.

MayerMar avatar Jul 13 '17 12:07 MayerMar

I have followed all suggestions like using overflow : visible or appendTo="body" but nothing working for me and the dropdown in disabled mode <p-column [style]="{'width':'5%','overflow':'visible'}" [sortable]="false" field="Status" header="Status" [filter]="true" filterMatchMode="equals" > <ng-template pTemplate="filter" let-itemcol> <p-dropdown [options]="statusList" [style]="{'width':'100%','overflow':'visible'}" appendTo="body" (onChange)="dtaction.filter($event.value,itemcol.field,itemcol.filterMatchMode)" styleClass="ui-column-filter"></p-dropdown> </ng-template> </p-column> image

The issue happening when using the bootstrap modal and here is plunker http://plnkr.co/edit/tmfPyfnzo0DMvhglPzk2?p=preview Please help to resolve it

ravikzm avatar Oct 29 '17 18:10 ravikzm

Hello Guys, I solved the dropdown not showing bug by using the appendTo="body". But now what's happening is kind of ridiculous. As I am clicking on some dropdown to open and then scrolling the data of the table the drop-down is going with the table data. :thinking: :worried: I am attaching the screenshot of that. Please have a look and someone please tell me the reason why its happening. Thank you so much, guys. :innocent:

peek 2018-08-28 00-30

lalitmee avatar Aug 27 '18 19:08 lalitmee

lalitmee did you find solution

UttamGiri avatar Aug 01 '19 15:08 UttamGiri

@lalitmee did you find the solution?

emrebaris9 avatar Dec 23 '19 19:12 emrebaris9

@emrebaris9 did you find the solution?

lingardo avatar Mar 02 '20 12:03 lingardo

@emrebaris9, it was a long time ago. I don't remember. But as I can see the screenshot I have attached, I don't think I found the solution.

lalitmee avatar Mar 02 '20 13:03 lalitmee

Guys, i found the solution, just need to delete propperty overflow: hidden in ui-table-wrapper

lingardo avatar Mar 03 '20 16:03 lingardo

In my case this issue was due that i forget to import the BrowserAnimationsModule in app.module.ts

import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

mbsanchez avatar May 18 '20 12:05 mbsanchez

magic! Thank you very much

hulchenko avatar Jul 29 '22 17:07 hulchenko