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

Issue with LsitBox and style since 17.18.4 #16051

Closed
mahald opened this issue Jul 17, 2024 · 1 comment · Fixed by #16061 · 4 remaining pull requests
Closed

Issue with LsitBox and style since 17.18.4 #16051

mahald opened this issue Jul 17, 2024 · 1 comment · Fixed by #16061 · 4 remaining pull requests
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@mahald
Copy link

mahald commented Jul 17, 2024

Describe the bug

I have following List box:

    <p-listbox [options]="items" optionValue="value" optionLabel="label" [ngModel]="selectedItem" (ngModelChange)="itemSelected($event)" filter="(true)"
      (onDblClick)="showDialog('edit')" [listStyle]="{'max-height':'70vh'}" [style]="{'width':'100%'}">
      <ng-template let-item let-i="index" pTemplate="item">
        <div class="p-helper-clearfix">
          <span [class.notOwn]="isDisabled(item.value)" [class.own]="!isDisabled(item.value)" style="float:left;margin:0px 0px 0 0">{{item.label}}</span>
        </div>
      </ng-template>
    </p-listbox>

with Version 17.18.3 it produces this HTML as expected:

image
with max-height 70vh

however after updateing to primeng 17.18.4 in package.json (it's the only package update in my test) the 70vh from [listStyle] is gone ad is replaced with 200px from i don't know where:

image

Environment

Debian12
Node v18.16.1
"typescript": "5.3.2"
recently update all packages

Reproducer

No response

Angular version

17.3.12

PrimeNG version

17.18.4

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v18.16.1

Browser(s)

latest Chrome

Steps to reproduce the behavior

use a p-listbox with [listStyle]="{'max-height':'70vh'}"

Expected behavior

the inner element of the listbox uses the max-height as provided by listStyle (but it just uses 200px hard?)

@mahald mahald added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 17, 2024
@mahald
Copy link
Author

mahald commented Jul 18, 2024

It's mostlikely related to this change:
059f369

image

if i add scrollHeight="70vh" to the listbox it applies this as max-height.

Since 17.18.4 it overwrites the listStyle max-height with 200px if the scrollHeight is not set, waht is a breaking change for my use case.

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 18, 2024
@cetincakiroglu cetincakiroglu added this to the 17.18.5 milestone Jul 18, 2024
cetincakiroglu added a commit that referenced this issue Jul 18, 2024
Fixed #16051 - Issue with ListBox and style since 17.18.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment