我对Handsontable pro还是陌生的,任何答案或建议将不胜感激。
我正在通过redux更新公式的变量,但是当此组件在更新后刷新时,handontable将不会使用更新后的变量重新计算。
render() {
console.log(convertAspts(this.props.assumptions)); // I can get the updated props here
return (
<div>
<HotTable
root="hotModeler"
ref="hotModeler"
preventOverflow="horizontal"
settings={{
colHeaders: true,
rowHeaders: true,
data: convertDataToTable(this.props.cells),
formulas: {
variables: convertAspts(this.props.assumptions)
},
afterOnCellMouseDown: this.handleAfterOnCellMouseDown,
afterChange: this.handleAfterChange,
afterSelection: this.handleAfterSelection
}}
/>
<Button
bsStyle="primary"
fill
// type="submit"
onClick={this.handleSaveHottable}
>
Save
</Button>
</div>
);
}