Primeng: Dropdown inside container with overflow: hidden

Created on 8 Jun 2016  路  10Comments  路  Source: primefaces/primeng

Hello. I'm impressed how much useful directives you have - thank you!

There is one issue with dropdown: when parent element (container) has "overflow: hidden" and fixed height, dropdown menu will be clipped after container's height limit.
screen shot 2016-06-08 at 16 39 23

I know one way how it can be solved (and how ng-material is doing it): attach popup menu part as a child of the <body>, with fixed position, intercept all key-down events and all scroll events, right from the <body>.
But maybe there are other ways - you have a lot of elements done and it means you have a lot of experience, so maybe you'll find even better ways to fix it.

Most helpful comment

you can try <p-dropdown appendTo="body" ...

All 10 comments

Just a note: the same thing happens with the Calendar component.

you can try <p-dropdown appendTo="body" ...

Doesn't work, unfortunately. :-/

appendTo="body" fixes this for me.

I think the problem I have with appendTo is actually the positioning/available space calculation issue I created in https://github.com/primefaces/primeng/issues/2128.

you can try <p-dropdown appendTo="body" ...

this worked for me!

you can try <p-dropdown appendTo="body" ...

This resets the styling I have made for the dropdown menu.

appendToBody doesn't work for me.

I solved my issue, just i forgot to import the BrowserAnimationsModule

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

Worked for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Helayxa picture Helayxa  路  3Comments

miresk picture miresk  路  3Comments

lilling picture lilling  路  3Comments

garethlewis picture garethlewis  路  3Comments

gatapia picture gatapia  路  3Comments