1

I am trying to draw a table using

var table = new Tabulator("#example-table", {
    height: "75vh",
});

But, the height is always 75vh even though contents are less which looks ugly. See the dark gray area below the table. enter image description here

I tried using the below so that height is never above a value & resizes automatically if less content is there.

var table = new Tabulator("#example-table", {
    height: "auto",
    maxHeight: "75vh",
});

Suggest me some hack as I coudn't get anthing in documentation.

Oli Folkerd
  • 7,510
  • 1
  • 22
  • 46
Pankaj Kumar
  • 107
  • 8

1 Answers1

0

As of version 4.6 there is now a maxHeight setup option:

var table = new Tabulator("#example-table", {
    maxHeight:"100%", //do not let table get bigger than the height of its parent element
});
Oli Folkerd
  • 7,510
  • 1
  • 22
  • 46