Some rows will not be loaded into the handsontable when the table load more rows than last time

Tags: #<Tag:0x00007efc72896b68>

Hello,

I have a handsontable instance with member minSpareRows: 1, there is only one empty row after the table initialization, but when I loaded 10 lines of data into the table, just the first row was filled in properly, there is still only one row in the table, the rest 9 will not be loaded until I click on the table or scroll the mouse wheel.

Following is the code of handsontable definition:
hot = new Handsontable(divHot, {
stretchH: ‘none’,
minSpareRows: 1,
minRows: 0,
rowHeaders: true,
contextMenu: false,
autoRowSize: false,
autoColSize: false,
hiddenColumns: {
columns: [0],
indicators: false
},
columnSorting: true,
colHeaders: [‘rid’, …],
columns: [{
data: ‘rid’
}, …
});

If I render the handsontable in sleeping for 100ms after loadData, all row would be loaded properly, but there is a interrupt in loading between the first row and the rest of rows. Following is the code of render:
hot.loadData(jasonCur);
setTimeout(function() {
hot.render();
},100);

And this phenomenon could also occur if the handsontable load more rows than last time. For example, the table has loaded 3 rows of data, but now, I want to load a new result set which has 10 rows of data, the table will only load top 3 rows of the new result set, until I click on the table or scroll the mouse wheel.

Is this a issue of Handsontable please? Or, is there someway I can use in load data properly? thanks.

Hi @kailin.lu
I would really appreciate if you could create a live demo, for example using JSFiddle to replicate the described case.

Hi @aleksandra_budnik
I have created a demo: https://jsfiddle.net/kailkailin/2uobt5ch/3/ , and I found that if I remove the “hiddenColumns” option, then the table will be loaded normally, otherwise, I have to click the empty row to load the rest of the rows. We want to use “hiddenColumns” option in our case, please help.

I’ll mark this issue as a bug.
If I comment filters table load as expected.

A similar issue will occur when ‘loadData’ into a table which enable ‘dropdownMenu’ and ‘filters’ options.

Hi @aleksandra_budnik,
Please how is the solution going? thank you very much!

Sorry to say that @kailin.lu but there were no updates yet.

Our devs are in the middle of two big projects now and I think that they’ll be fully booked till the end of July.

Oh, @aleksandra_budnik, it will be too long. Is there some way we could do it a little earlier please? We are in dire need of your help. Thank you very much.

Hi @kailin.lu, I’ve prepared a changed demo at https://jsfiddle.net/2uobt5ch/4/. Maybe the solution for you will be load filters more lazy via updateSettings.

thank you @budnix :slight_smile:

Hi @aleksandra_budnik & @budnix , we’ve changed the code as your suggest in my another topic, but it is not helpful for when we want to reload the data after update or change the filters. Thanks.

@kailin.lu

There are several/many cases where a Handsontable does not render correctly :frowning:, usually to do with stuff still being “hidden” at render time. As you have stated, it draws properly when “I click on the table”. You have found that you can do a hot.render() after a slight delay; for my cases I have had to do a window.document.documentElement.click() to make it work right. You can make these happen after data reload/update/change filters too if necessary.

Your delay is only a tenth of a second: is that really not acceptable, because it does not seem like a “dire” problem?

Hi @jon, sorry for not giving you a quick reply since I had to deal with some personal affairs these days. Although we have added a additional render() after loadData(), but the user experience is very bad, the table will refresh twice. and the spare row will locate in the middle of the table, sometimes, the table even wouldn’t render correctly. Please could you help us to resolve this issue asap? Thank you very much.

Hi @aleksandra_budnik,
Hope you are fine! I think your devs have finished the two big projects you mentioned last month. Please could they help us to check this issue now? thank you very much.

Hi @kailin.lu
Unfortunately cause of the vacation period we’re still working on the formulas and nested rows but if you made any changes to your code I’d be happy to take a look and maybe find a workaround.

Hi @aleksandra_budnik

Is there any status on this fix?

Thank you for all your support.

Hi @davidfpcruz
besides @budnix demo there’s no update about this ticket

HI i need a help to solve an issues
1.when i apply scroll to hansontable div it shows only one cell on the first load and when i click on the cell it opens all cells .
2.scrolling is very slow.

Hi @sathishsundar92

if your instance still experience some lagging please share a demo via JSFiddle