Closed mcgiany closed 7 years ago
Thanks for raising this. The problem with calling _positions()
in the scroll event handler is that it is very slow. It has to read measurements from the DOM, which is going to seriously impact performance.
I think it would be better to call the fixedHeader.adjust()
public API method whenever the table's content changes.
Great. That helps me a lot. Thanks :)
Hi,
In case that table has dynamic rows (for example: expanded detail row), so the table height can change dynamicaly, it is necessary to calculate positions on every scroll. If not, then can the floating header disappear when you scroll the bigger table as were at init time.
My suggestion is to change code in constructor from this:
to this:
Or better, this behaviour can be changed by some options.