semantic-ui-react <响应>不适用于<Table.Cell>

rex*_*rex 8 javascript reactjs semantic-ui responsive semantic-ui-react

我正在使用semantic-ui做出反应来呈现数据表.我的要求是当页面在移动视图上时,我隐藏了某些列.我试着用className="mobile hidden"了上Table.Cell元素,但是这似乎并没有在所有的工作.

然后我尝试使用Responsive下面的组件,但我收到一个错误.我在这里错过了什么吗?无法找到有此问题的其他人...

  <Responsive as={Table.Cell} minWidth={Responsive.onlyMobile.minWidth}>
     {record.datapoint}
  </Responsive>
Run Code Online (Sandbox Code Playgroud)

调整窗口大小时,我在控制台中收到此错误...

index.js:2177 Warning: Can only update a mounted or mounting component. This usually means you called setState, replaceState, or forceUpdate on an unmounted component. This is a no-op.

Please check the code for the Responsive component.
Run Code Online (Sandbox Code Playgroud)

Ole*_*hov 3

事实上,这是错误:(我已经创建了 PR 来解决所描述的问题,请参阅Semantic-Org/Semantic-UI-React#2421

您提供的代码不会重现问题,提供的示例永远不会出现该问题。然而,它确实存在:)核心问题是组件的卸载,Responsive当它由父级完成并setState()在未挂载的组件上调用时。Codesandbox上的一个示例重现了问题。