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

p-listbox: style="max-height: 200px" being set automatically #14704

Closed
psarno opened this issue Feb 2, 2024 · 1 comment
Closed

p-listbox: style="max-height: 200px" being set automatically #14704

psarno opened this issue Feb 2, 2024 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@psarno
Copy link

psarno commented Feb 2, 2024

Describe the bug

In a standard <p-listbox>, the height is limited to 200px due to a style="max-height: 200px" being placed on the <div> with the p-listbox-list-wrapper class:

<p-listbox
name="notificationTypes"
[options]="notificationTypes"
[(ngModel)]="selectedTypes"
[multiple]="true"
optionLabel="description"
[checkbox]="true"
[showToggleAll]="false"
/>

image

The relevant area in the source is:

image

A workaround is to set [scrollHeight]="'auto'" on the <p-listbox>.

Note in Stackblitz, when rendered, height is capped and you get a scrollbar:

image

Environment

PrimeNG 17.5 (also occurs with 17.4)
Angular 17.1.0

Reproducer

https://stackblitz.com/edit/github-zmo9ym?file=src%2Fapp%2Fapp.component.ts

Angular version

17.1.0

PrimeNG version

17.5

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.0

Browser(s)

No response

Steps to reproduce the behavior

Example and StackBlitz repro provided

Expected behavior

No max-width style placed by default.

@psarno psarno added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 2, 2024
@mehmetcetin01140
Copy link
Contributor

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants