Handsontable-公式变量更改后无法重新计算

时间:2018-06-27 15:33:58

标签: javascript reactjs redux handsontable formulas

我对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>
);

}

0 个答案:

没有答案