tabulator icon indicating copy to clipboard operation
tabulator copied to clipboard

Need table.setMaxHeight() method

Open nmpetkov opened this issue 1 year ago • 1 comments

Describe the solution you'd like It is necessary to redraw the table with the maxHeight option changed.

Describe alternatives you've considered At the moment I manage to implement this by table.destroy() and a complete rebuild of the table.

Additional context 1

I need to use table.redraw() to implement maximizing the table to full screen. To implement this function, it is necessary to modify table.options.maxHeight. Changing this option directly does not work. There is currently a table.setHeight() method, and a table.setMaxHeight() method is also required. I was able to implement maximize/minimize the table, but with a complete rebuild of the table. To optimize work and solve a number of other similar situations, a table.rebuild() method is also needed, similar to table.redraw(), but without resetting the data - only rebuild with the currently set table.options.

The current implementation of maximize/minimize I do as follows:

Maximize: $('#' + table_id).addClass('tabulator-fullscreen'); table.destroy(); buildTabulator(); // here a new Tabulator with maxHeight: '100%'

Minimize: $('#' + table_id).removeClass('tabulator-fullscreen'); table.destroy(); buildTabulator(); // here a new Tabulator with maxHeight: 600

Where: .tabulator-fullscreen { position: fixed; top: 0; left: 0; z-index: 1050; width: 100%!important; background: #fff; height: calc(100vh); overflow-y: scroll; }`

nmpetkov avatar Jun 28 '23 05:06 nmpetkov

I would be infavor of something like this or make it automatic if the height is set to 100%. There are lot of nagging height issues I am dealing with as well. Ref https://github.com/olifolkerd/tabulator/issues/4142

Jojoshua avatar Jul 17 '23 13:07 Jojoshua