简体   繁体   English

在react-table中设置selectTable标头的样式

[英]Styling the selectTable header in react-table

Using the selectTable option out of the react-table component, we've figured out how to style each header's column with headerStyle that we're generating but can't figure out how to style the actual select toggle (first) column that contains the toggle checkbox. 通过使用react-table组件中的selectTable选项,我们已经找到了如何使用我们正在生成的headerStyle设置每个标题列的样式,但无法弄清楚如何为包含该标题的实际选择切换(第一)列设置样式切换复选框。

Can't seem to find anything in the documentation that would indicate how to do this. 似乎在文档中找不到任何指示如何执行此操作的内容。

I am answering but if your issue is not related to this then Can you explain the issue with your code? 我正在回答,但是如果您的问题与此无关,那么您可以用代码解释该问题吗?

    columns={[

        {
           accessor: 'myAcc',
           Header: //any jsx or string here,
           getProps: () => getProps(redCell), // return CSS
           Cell: (rowInfo): JSX.Element => //you can render your jsx for the cell. 
        },
   ]}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM