DataTable scrollable scrollHeight

UI Components for Vue
Post Reply
avenmore
Posts: 17
Joined: 09 Nov 2020, 07:03

26 Jan 2021, 16:17

It would be really nice to be able to set the DataTable height to 100% and the scrollHeight to 100% so that the component would fill the available height and the p-datatable-scrollable-body would kick in if the height of the container is exceeded.

Unfortunately the scrollHeight prop only seems to accept px and I've had to resort to calculating it dynamically and watching the window size but it is very fragile.

Please PrimeTek, would you consider implementing this?

avenmore
Posts: 17
Joined: 09 Nov 2020, 07:03

29 Jan 2021, 09:41

Have I got egg on my face again...

This is already implemented and activated using:

Code: Select all

scrollHeight="flex"
I had one small problem with the table footer template contents overflowing but this was solved by adding the style:

Code: Select all

    :deep .p-datatable-flex-scrollable .p-datatable-scrollable-wrapper {
        overflow: hidden;
    }

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests