I’m running into an issue with Tabulator where I set maxHeight on my datatable but the page runs at 100% CPU and eventually crashes, profiler in Chrome crashes as well but I was able to get this stack trace attached. I ran into this issue when I started adding more data to the app. I’ve only got 47 records for one of the pages and it crashes. I’ve also only had it use the “name” column and commented out all other columns, but still the same issue.
I’ve tried to reproduce this in js fiddle, but I can’t. Any datatable in my app that uses maxHeight and has over 20 records will crash the page. If I set maxHeight to 600px it works fine. Also using height instead of maxHeight works fine as well. But I would prefer to use maxHeight so the datatable grows to fill the page.
Here’s my code to create one of my datatables.
renderTabulator(url: string) {
this.table = new Tabulator(this.element, {
ajaxURL: url,
movableColumns: true,
layout: "fitDataFill",
maxHeight: `calc(100vh - ${this.tableDistanceToTop + 30}px)`,
placeholder: "No Data Available",
columnDefaults: {
vertAlign: "middle",
},
columns: [
{
field: "actions",
title: "",
formatter: "html",
headerSort: false,
headerHozAlign: "center",
hozAlign: "center"
},
{ field: "name", title: "Name", headerFilter: "input", width: 200 },
{ field: "address", title: "Address", headerFilter: "input", width: 250 },
{ field: "suburb", title: "Suburb", headerFilter: "input" },
{ field: "state", title: "State", headerFilter: "input", headerHozAlign: "center", hozAlign: "center" },
{ field: "postcode", title: "Postcode", headerFilter: "input", headerHozAlign: "right", hozAlign: "right" },
{ field: "area", title: "Area", headerFilter: "input" },
],
});
}
Any ideas what I’m doing wrong?
