如何访问和更改 react-handsontable 中的 selectColumns 核心方法?
How to access and change selectColumns core method inside react-handsontable?
我想知道如何在 react-handsontable 中访问 selectColumns menthod。我已经尝试将引用分配给热 table 组件 <HotTable refs="hot"/>
但我仍然无法访问 selectColumns 方法。
感谢阅读这个问题。
@Sagar 还有其他方法吗?如果我们在其他组件中包含 HotTable 并且无法以这种方式呈现它,那就不是那么方便了。
如果我们从示例
中谈论这一行
const exampleComponent = ReactDOM.render(
<ExampleComponent />, document.getElementById('example')
);
window.hotInstance = exampleComponent.refs.hot.hotInstance;
没关系,当我们将它渲染为一个单独的组件时。但是如果我在 App 组件中导入它然后通过 ReactDom.render 渲染 App 组件,我没有引用,只有空对象
我想知道如何在 react-handsontable 中访问 selectColumns menthod。我已经尝试将引用分配给热 table 组件 <HotTable refs="hot"/>
但我仍然无法访问 selectColumns 方法。
感谢阅读这个问题。
@Sagar 还有其他方法吗?如果我们在其他组件中包含 HotTable 并且无法以这种方式呈现它,那就不是那么方便了。 如果我们从示例
中谈论这一行const exampleComponent = ReactDOM.render(
<ExampleComponent />, document.getElementById('example')
);
window.hotInstance = exampleComponent.refs.hot.hotInstance;
没关系,当我们将它渲染为一个单独的组件时。但是如果我在 App 组件中导入它然后通过 ReactDom.render 渲染 App 组件,我没有引用,只有空对象