I am using the React Wrapper for HOT. The data in my nested rows table is equal to the state of the React Component. That means that when the state changes the entire table should update. For me the table does not rerender or only rerenders after I click on the expand/collapse buttons. The video shows my problem. Is there a known issue regarding this problem or is there a mistake on my end?
As you can see the table only shows the full dataset when I press the collapse button on a row.
This is the main code I use. You can atleast use this to review the way I handle the data, state and the handsontable. I will try to recreate a working example as well.
Hi, sorry for the late answer. And thank you for the demo, it helped a lot to understand your use case.
Are you sure this would work in React? hotSettings are not stored in the state, so they are not updated. One of the properties is a reference to something in the state that changes on component mount but should it be recognized as a change? Static property was created before the change and copied deeper.
IMO the most efficient way would be to set data attribute to use nestedTableData directly from the state and leave hotSettings as static property that never changes: https://jsfiddle.net/7pdvq45L/
I guess that tackles the issue in the jsfiddle. The main issue I am having, which I can’t really recreate in the fiddle is a huge amount of data. As showing in my video in the original post, the table doesn’t render properly the first time, only after I click on the collapse/expand buttons.
Here is a video showing some more details of the code. I will try my best to recreate the bug in a demo. A notable detail is that the dataset is not big by any means.
I got the problem fixed finally. I added some extra setState functions inside the componentDidUpdate function of react. This somehow fixed the bug and made the table render correctly.
Thank you for all the effort!