Hi everyone,
I am using Handsontable version 8.0.0 beta 1 as it fixes a lot of issues I was running into when using 7.3.0 and reloading data from the server.
What is the best/proper way to reload the hands on table data with the data source that has come back from an API call to the server. For example, the results that come back from the API call to the might have been re-ordered for various business reasons. The results from the API call would be returned after the Handsontable has already been initialized and constructed and had data.
From what I know, I can think of 3 options:
-
Use hot.updateSettings({data: updatedData});
-
Use hot.loadData(updatedData);
-
Use code to update the existing data collection which Handsontable is configured to reference to have all of the updates from the server. Our code (which used Handsontable 1-7.3) used to call hot.render after data was changed in this way, but the current documentation indicates that you should not call this manually. I do seem to run into bugs when I try to go about this method. But using methods 1 and 2 don’t cause those same issues.
Thanks,
Jude