Dynamic scrollHeight for turboTable

UI Components for Angular
Post Reply
mseaman
Posts: 1
Joined: 14 Mar 2018, 21:09

14 Mar 2018, 22:55

I noticed that if you change the scrollHeight dynamically in the turboTable which causes the scrollbar to show, it pushes the data to the left and then doesn't align with the header. This isn't the case on initiation or if it has a fixed scrollHeight.

I was able to fix it by calling this.alignScrollBar() in the source:

Code: Select all

    Object.defineProperty(ScrollableView.prototype, "scrollHeight", {
        get: function () {
            return this._scrollHeight;
        },
        set: function (val) {
            this._scrollHeight = val;
            this.setScrollHeight();
            this.alignScrollBar();
        },
        enumerable: true,
        configurable: true
    });
Do you think you can add this line or something similar to this property so that I won't need a custom version of TurboTable?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

15 Mar 2018, 11:24

Provide a PR please and we'll review.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests