diprokon / ng-table-virtual-scroll

Virtual Scroll for Angular Material Table
https://diprokon.github.io/ng-table-virtual-scroll
MIT License
137 stars 42 forks source link

Sticky header jumps around when changing columns #105

Closed sonallux closed 2 years ago

sonallux commented 2 years ago

The sticky header does not stay at the top when changing the column order after scrolling down.

Reproduce

image

williammnarrowpath commented 2 years ago

Any update on this issue?

sonallux commented 2 years ago

update on this issue?

Not really, unfortunately. I have looked into the code a bit and found more background about what's causing this behaviour. The sticky header is kept at the top by adding top: <some offst> CSS style to the <th> element. But when the columns change, the header elements are removed and readded to the DOM, which discards the top CSS property. It is actually set to top: 0px.

Unfortunately, I have currently no idea how to reset the top property to the correct offset after the columns have been changed. Maybe @diprokon has some idea?

kiranatious commented 1 year ago

can this be fixed for 1.3.*