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

Scroller/Tree/TreeTable/Table: VirtualScrolling does not work after upgrading to PrimeNG 18 from 17.18.12 #17102

Open
BeGj opened this issue Dec 17, 2024 · 6 comments
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@BeGj
Copy link
Contributor

BeGj commented Dec 17, 2024

Describe the bug

Whenever you are using a virtualScroll together with scrollHeight: flex it will not work. Nothing will display.

I have tested on three different components

  • Table
  • TreeTable
  • Tree
    Se attached repository for the TreeComponent. Since all these component use p-scroller under the hood I think it's likely something wrong with p-scrolller

Environment

See package.json

Reproducer

https://github.com/BeGj/primeng-18-virtualscrolling-flex-height-bug

Angular version

  • 18.2.12
  • 19.0.5

PrimeNG version

  • 18.0.0
  • 18.0.1
  • 18.0.2
  • 19.0.0
  • 19.0.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v20.18.0

Browser(s)

firefox 133 and chrome 129 and chromium 133

Steps to reproduce the behavior

  1. Use table component
  2. Set scrollheight flex
  3. set virtualscroll to true
  4. profit.
  5. see attached repository https://github.com/BeGj/primeng-18-virtualscrolling-flex-height-bug

Expected behavior

Expects the virtual scrolling to work! Or at least dislay something like previously...

@BeGj BeGj added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 17, 2024
@mertsincan mertsincan added this to the 19.0.2 milestone Dec 19, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 19, 2024
@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 19, 2024
@BeGj
Copy link
Contributor Author

BeGj commented Dec 19, 2024

STill broken in 18.0.2 and 19.0.1. (Angular 18 and 19).

Here is v19 branch for reference https://github.com/BeGj/primeng-18-virtualscrolling-flex-height-bug/tree/angular19

@BeGj
Copy link
Contributor Author

BeGj commented Dec 19, 2024

It works in 17.18.15 (V17 branch for reference https://github.com/BeGj/primeng-18-virtualscrolling-flex-height-bug/tree/v17)

Something went wrong here: 17.18.15...18.0.0

@achimheynen
Copy link

I ran into that problem, too, and added a style to solve it:

// Fixes a no-size issue in p-table with virtual scroll and flex height
.p-datatable-flex-scrollable p-scroller {
    height: 100%;
    width: 100%;
}

@BeGj
Copy link
Contributor Author

BeGj commented Dec 20, 2024

I ran into that problem, too, and added a style to solve it:

// Fixes a no-size issue in p-table with virtual scroll and flex height
.p-datatable-flex-scrollable p-scroller {
    height: 100%;
    width: 100%;
}

This did not work in my sample provided above, and neither in my production code..

I added this to styles.scss

:host ::ng-deep .p-datatable-flex-scrollable p-scroller {
    height: 100%;
    width: 100%;
}

Did I do it wrong, or do you have any further instructions?

@martinkasa
Copy link

I ran into that problem, too, and added a style to solve it:

// Fixes a no-size issue in p-table with virtual scroll and flex height
.p-datatable-flex-scrollable p-scroller {
    height: 100%;
    width: 100%;
}

thank you! worked for me

@dsubelman
Copy link

I ran into that problem, too, and added a style to solve it:

// Fixes a no-size issue in p-table with virtual scroll and flex height
.p-datatable-flex-scrollable p-scroller {
    height: 100%;
    width: 100%;
}

Thank you, that did the trick for Table, but not for TreeTable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Review
Development

No branches or pull requests

5 participants