反应表:行选择-不能选择多行



我不能选择多行——如果我选择一行,已经选择的行将被取消选择——也就是说,我一次只能选择一行。

有时我可以一个接一个地选择2行,但当我选择第3行时,其中一个已经选择的行会被自动取消选择,不允许我一个接另一个选择所有3行的

尽管"全选"复选框工作正常,但选中后会选中所有行。

我提供了由3行组成的数据

请帮忙。

Codesandbox-https://codesandbox.io/s/upbeat-breeze-hyodx?file=/src/App.js

问题在index.js文件中,React Table官方代码沙箱-

ReactDOM.render(<App />, document.getElementById('root'))

我使用的是React.StrictMode,如下所示-

const rootElement = document.getElementById("root");
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
rootElement
);

在移除React.StringMode时,一切都正常了,但不确定为什么Strict Mode会干扰

最新更新