I have issue that when I create HOT, set the data and update HOT settings, table looks corrupted. If I scroll the table horizontally it all gets back to normal. How can I force HOT to recaculate and rerender itself? Data is set correctly.
What I am doing more or less:
- Init HOT with settings containing
minSpareRows: 1,
autoColumnSize: true, - Set multiple cells values this.hotInstance().setDataAtCell(dataArray); (single call)
- Updates settings this.hotInstance().updateSettings({ minSpareRows: 0 });
- this.hotInstance().render();
I have even tried this.hotInstance().getPlugin(‘AutoColumnSize’).recalculateAllColumnsWidth(); but it does not help
After scrolling horizontally table redraws itself to a “normal” state where everything is alligned, event horizontal scrollbar is gone as everything now fits to screen with auto width columns.
PS editing data or scrolling vertically does not change how table is rendered, only horizontal scroll “fixes” fixes the issue