主要是利用到了Handsontable Instance的getData()方法取得实例数据(变更前数据)
利用beforeCreateRow接口来判断在行刷新前执行取得实例数据
直接代码:
instance.addHook('beforeCreateRow', function(){
if (myConst.INSTANCE_GET_FLG) {
var instance = $('#table_data').handsontable("getInstance");
myConst.TABLE_DATA_OLD = instance.getData();
myConst.INSTANCE_GET_FLG = false;
}
});