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: Variable row height bug: frozen columns row height does not align with scrollable columns row height. #13924

Open
tbaro opened this issue Oct 19, 2023 · 4 comments
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Milestone

Comments

@tbaro
Copy link

tbaro commented Oct 19, 2023

Describe the bug

With variable row heights, there is a mismatch between the frozen column row heights and the scrollable column row heights. More specifically:

When the height of the rows of scrollable columns are not all equal, the height of the corresponding frozen column does not match the height of the row of scrollable columns. In other words, row height of (pTemplate="frozenbody") does not match row height of (pTemplate="body".), when body row height is not a constant. There is no clear way to make these variable row heights match, which is strange because this should obviously be the default behaviour. Applying a fixed row height to both does not work as all rows would need to be set to the largest row height in the data set, which is not the desired behaviour,.

Environment

Issue occurs in all browsers on all operating systems. My specific O/S is Linux (Fedora 38) but same issue appears on Windows.

Reproducer

No response

Angular version

16.2.0

PrimeNG version

16.4.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.18.0

Browser(s)

All

Steps to reproduce the behavior

Example code attached:
example.zip

Run the attached simple example component - frozen column row heights do not align with scrollable column row heights.

Expected behavior

Height of frozen column rows should match height of scrollable body rows. If there is some use case where this may not be the desired behaviour (I can't imagine one), then a property could be made available (e.g. rowHeightMatching: boolean).

@tbaro tbaro added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 19, 2023
@tbaro
Copy link
Author

tbaro commented Oct 25, 2023

A workaround for this is to set the frozen row heights to the heights of the scrollable body rows whenever the scrollable body row heights change. This is not ideal, as it means doing this in ngAfterViewChecked, as well as in the onNodeExpand and onNodeCollapse events and also whenever the viewport is resized., but at least it works. Example code attached:

variable-row-heights.zip

IMHO, the tree table component would benefit from having a simpler more performant mechanism for handling this use case.

Copy link

This issue has been automatically marked as stale due to a lack of activity. If this issue is still relevant to you, please leave a comment so we can keep it open. We apologize for not being able to prioritize it sooner. If you have any new information or questions, please share them in your comment!

@github-actions github-actions bot added the Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response label Dec 16, 2024
@tbaro
Copy link
Author

tbaro commented Dec 17, 2024

Please leave this issue open. It is still unresolved and requires a messy workaround to align the row heights of the scrollable colums with the row heights of the frozen columns. Surprising that there is no interest in fixing this obvious and highly visible (to end users) bug.

@mertsincan mertsincan added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 25, 2024
@mertsincan mertsincan added this to the Future milestone Dec 25, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 25, 2024
Copy link

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
Status: Review
Development

No branches or pull requests

2 participants