[英]How to set max height for Tabulator table?
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.但是,高度总是75vh
,即使内容较少,看起来很难看。 See the dark gray area below the table.请参阅表格下方的深灰色区域。
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.建议我一些技巧,因为我无法在文档中得到任何东西。
As of version 4.6 there is now a maxHeight setup option:从 4.6 版开始,现在有一个maxHeight设置选项:
var table = new Tabulator("#example-table", {
maxHeight:"100%", //do not let table get bigger than the height of its parent element
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.