primeng icon indicating copy to clipboard operation
primeng copied to clipboard

p-table - Virtualscroll does not work when p-table is used inside p-dialog

Open ghost opened this issue 5 years ago • 7 comments

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports) https://stackblitz.com/edit/p-table-virtualscroll-bug?file=src/app/app.component.html

Current behavior When I'm using a p-table with virtualscrolling enabled inside a p-dialog, then the content of the table is barely visible.

Expected behavior I'm expecting the virtualscroll of p-table to be supported inside p-dialog too.

Please tell us about your environment: OS: Windows

  • Angular version: 11.0.4

  • PrimeNG version: 11.1.0

  • Browser: Chrome

ghost avatar Jan 14 '21 14:01 ghost

It also happens using VirtualScroller component itself (without table): https://stackblitz.com/edit/primeng-dialog-demo-pgz5bv?file=src%2Fapp%2Fapp.component.html

I suppose that for virtual scrolling some attributes like offsetTop are being used and they work different in a modal.

vicesmat avatar Jan 27 '21 15:01 vicesmat

Related to https://github.com/primefaces/primeng/issues/9298

mnhock avatar Feb 10 '21 15:02 mnhock

for me it doesn't work in fixed div that is dynamicaly hiden or shown.

matusko89 avatar Jun 24 '21 15:06 matusko89

Is there any plan to fix this bug? This is a significant bug, and a regression from past versions.

ryankugel avatar Apr 14 '22 14:04 ryankugel

Whis the latest primeng version it is not working.

mnhock avatar Sep 30 '22 10:09 mnhock

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 reopen the issue so we can include it in our roadmap? Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

mertsincan avatar Nov 09 '22 20:11 mertsincan

@vicesmat based off your stackblitz I found a pretty easy workaround for making virtualscroll vissible in p-dialog.

<p-dialog ... (onShow)="showDialog$.next(true)" (onHide)="showDialog$.next(false)"> <p-virtualScroller *ngIf="showDialog$ | async" ...>

Looks like there's a problem with timing of some logic execution in p-dialog and virtualscroll, when using p-dialog in html template, but making virtuallscroll displayed only when p-dialog opens up at least makes it work...

Freesebee avatar Mar 04 '25 15:03 Freesebee