javascript - 在 react-table 中设置 selectTable 标头的样式
问题描述
使用 react-table 组件中的 selectTable 选项,我们已经弄清楚了如何使用我们正在生成的 headerStyle 设置每个标题列的样式,但无法弄清楚如何设置包含切换复选框。
似乎无法在文档中找到任何表明如何执行此操作的内容。
解决方案
我正在回答,但如果您的问题与此无关,那么您能用您的代码解释问题吗?
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.
},
]}
推荐阅读
- javascript - WebSocket 连接无效帧头
- macos - 如何在本地笔记本电脑上拥有源代码和 IDE,并在 docker 容器内的另一台机器上运行它?
- python - 无法捕获错误,而是打印到控制台
- php - PHP 缓冲区读取
- visual-foxpro - Foxpro Visual 9 中的字符串拆分
- r - 根据字符串模式匹配拆分数据框列
- php - shopware 5:无法加载模板片段
- python - 如何检测我的角色是否与敌人相撞并在命中 3 次后关闭游戏
- angular - 如何将 [checked] 与 precheck 和 ngModel 结合起来同时与函数绑定?
- python - 在 GraphQL 中过滤嵌入式文档列表