Render More Rows after Initial Render

Tags: #<Tag:0x00007f8b1d9e9a08>

Trying to design a markup tool using Handsontable.

I currently have set up a new method towards highlighting cells. It’s sort of like excel, in which you would type “=” in the cell and then you could use the arrow keys to select other cells by highlighting them myself (not native HandsonTable). This would populate a formula within the initially selected cell.

Unfortunately if I try to highlight a cell that is 30 rows away from the initially highlighted cell, the highlighting disappears completely.

This is because those rows were not rendered initially. If I set the option “renderAllRows” to true in the sheet settings, then I can properly highlight this cell, however it is EXTREMELY slow.

Is there a way to render more rows in the stack based on how the user is interacting with the handsontable? For example, if I select an cell 30 rows down, then it would render 30 more rows?

Not sure if this would mean a new feature.

Hey @felix

That operation

if I select an cell 30 rows down, then it would render 30 more rows?

automatically renders the area that the user is selecting. It is impossible to render a range of cells that haven’t been rendered in the first place.
Can you send me a recording of your demo (with an opened console)?

To be honest you’ve done something that we couldn’t find time to develop for 2 years. I remember a discussion about this project. We wanted to add this functionality after releasing the Formula Plugin but needed to switch to something else and never finished it.

I am sorry but I won’t be able to help as we haven’t tried it ourselves.

I can only propose to turn on the viewportRowRenderingOffset via the afterScrollVertically to load only the rows that you need. The getLastVisibleRow returns the index of last visible row, so you can use it as a value to the offset method.

Ok thank you for your help, I’ll give that a shot. Cheers

1 Like