Set height of table to 98% of viewport size (98vh)
This fixes the issue #11 that I had with this module.
By setting the table height for Tabulator then it can maintain the scrollbars in view and also the added benefit of the data rendering faster as it only needs to render the data on screen, not the entire table. In the Tabulator documentation it is recommended to set the height to avoid performance issues. I have set the height to 98vh meaning 98% of the browser window size, had to go a bit lower as the scrollbar would be just out of view if set to 100.
This is just a quick fix, maybe it should be an option or something, you decide.

Tested on: PSVersion 6.2.0-preview.3 PSEdition Core GitCommitId 6.2.0-preview.3 OS Microsoft Windows 10.0.17763 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
Browser: Google Chrome 71
Thinking of adding an -AutoFit switch? If specified, then set the value. Thoughts?
I'm thinking more it should be default and then have the option to disable the height setting, seeing as it increases rendering performance and is recommended by Tabulator framework.
Good point. Just curious, if it's recommended by the framework, why don't they enable it by default? ;-)
I don't know I'm guessing it's because it is a JS framework and they let settings like the height and width up to the implementer since they decide where to place it. The use case here is special in that normally if you used this on a webpage you design you would not place a
But have a look at the FAQ under The table takes a long time to load it describes where you can set it and why it should be set. I used the option of setting it in the table constructor, but maybe doing it in the CSS is cleaner.
Cool. It sounds like a sensible default. Excel has an "AutoFit", you need to specify it explicitly, but it makes more sense there because it could be an operation on thousands of rows compared to a viewport for a page.
Need to think of a sensible name to disable it, DoNotLimitToViewPort
Other options could be:
NoTableHeight
NoTableLimit
DoNotSetTableHight
NoHeight
Leaning most towards something like NoTableHeight as the ViewPort is something in HTML that maybe not a lot will know what is and table is maybe more intuitive.
Interesting. Maybe ShowFullTable
Would that not imply that we are hiding stuff by default which is not the case here.
Yeah. Maybe a param name like on Format-Table something along -AutoSize ?