我无法在用 TableRowColumn 包裹的 TextField 中填写任何内容

I can not fill out anything in TextField wrapped with TableRowColumn

我正在使用 Material-ui,它的组件很棒,但是当我尝试使用 Table 时,问题发生了...

<TableBody
 displayRowCheckbox={true}
>
 <TableRow>
  <TableRowColumn><TextField hintText="hintText"></TableRowColumn>
 </TableRow>
<TableBody>

这只是我的代码的一部分。当我在 TextField 中填写内容时,整行都被激活并且复选框被选中。即使我无法在 TextField 中填写任何内容。我只想在单击复选框而不是整行时激活复选框,然后在 TextField 中填写一些内容。有什么属性可以解决这个问题吗?

另外,我在 TextField 中尝试 histStyle={{textAlign: 'center',以便将 histText 设置在中心。但是,它不起作用。请帮助我。

向您的 TextField 添加一个 onClick 处理程序,停止事件传播直到 table cell/row:

<TextField onClick={(e) => e.stopPropagation()} hintText="hintText" />