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

TreeTable with scrollHeight="flex" shrinks the header as the table rows are expanded. #14523

Closed
mconner opened this issue Jan 10, 2024 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@mconner
Copy link

mconner commented Jan 10, 2024

Describe the bug

When using a TreeTable with scrollHeight="flex", as the table nodes are expanded the header shrinks.

This appears to be caused by the fact that the styling for .p-treetable-scrollable-header (and .p-treetable-scrollable-footer) has overflow: hidden, its flex-shrink defaults to 1, and its parent element (p-treetable-scrollable-view) has display: flex and flex-direction: column. As such, when expanding the table nodes, the header shrinks.

image

Environment

Windows 10, using either:

  • Edge (Microsoft Edge for Business, Version 120.0.2210.121 (Official build) (64-bit))
  • Chrome: Version 120.0.6099.216 (Official Build) (64-bit)
  • PrimeNG 17.3.1
  • Angular 17.0.8

Reproducer

https://stackblitz.com/edit/54vzpp-lc5spd?file=src%2Fapp%2Fdemo%2Ftree-table-scroll-vertical-demo.html

Angular version

17.0.8

PrimeNG version

17.3.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.10.0

Browser(s)

Edge (Microsoft Edge for Business, Version 120.0.2210.121 (Official build) (64-bit)) Chrome: Version 120.0.6099.216 (Official Build) (64-bit)

Steps to reproduce the behavior

The Reproducer link is a clone of the example provided in the Vertical scroll example in the documentation, where the card style has been modified to limit the available size (and provide an obvious border, so you can see that.)

  1. Expand the table nodes
  2. Note that the header is cut off.

Workaround:

  1. Uncomment the ng-deep scss to set the table header to not shrink.

Expected behavior

The header should not be cut off as the as the table grows.

@mconner mconner added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 10, 2024
@mehmetcetin01140 mehmetcetin01140 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 Jan 11, 2024
@mertsincan
Copy link
Member

Thanks a lot for your report! We'll check it before the milestone is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

4 participants