What is the best method to rendering a grid.js table in resizable container.
If I don't set the height configuration object of the grid, the table size exceed his container and i can't have access to the overflow bar at the end of the table.
grid = new gridjs.Grid({
columns: [/*A lot of column*/],
fixedHeader: true,
width: document.getElementById("MY_CONTAINER_ID").clientWidth,
height: document.getElementById("MY_CONTAINER_ID").clientHeight,
data: () => {
return new Promise(resolve => {
setTimeout(() =>
resolve([/*A lot of rows*/]), 2000);
});
}
}).render(document.getElementById("MY_CONTAINER_ID"));
In a purpose of a resizable div we can set the height with .updateConfig() method and re-render all the datas but it's a nonsense (even more if the dataset is quite large).