Load data in react js

Tags: #<Tag:0x00007efc6b777900>

Hi
please tell me how to use loadData() function in ReactJs
and How to create New Column in react js

Hi @kunal

Here https://jsfiddle.net/handsoncode/axzs6om2/ is an example with loadData() triggered by a button click. Once you set up the reference to the instance of Handsontable you are able to use any of the core methods.

To add columns you can use alter() method. It is also a core method so to try it our you just need to change

this.hotTableComponent.current.hotInstance.loadData([['new', 'data']]);

to

this.hotTableComponent.current.hotInstance.alter('insert_col', 1);

in my demo. This demo will add one empty column on index 1 https://jsfiddle.net/handsoncode/axzs6om2/1/