简体   繁体   English

材料表过滤:filterCellStyle backgroundColor 未应用于整行

[英]material-table filtering: filterCellStyle backgroundColor not applied to entire row

Material-table filtering: filter cell style's background color is not applied to the entire row.材质表过滤:过滤单元格样式的背景颜色不应用于整行。 The column created for row selection has its own style and I don't know how to override it.为行选择创建的列有自己的样式,我不知道如何覆盖它。

Code example: https://codesandbox.io/s/material-table-filter-selection-forked-t9vb54?file=/src/App.js代码示例: https ://codesandbox.io/s/material-table-filter-selection-forked-t9vb54?file=/src/App.js

just add this to your style.css file:只需将其添加到您的style.css文件中:

.App
  .MuiTableBody-root .MuiTableRow-root:first-of-type {
  background: #6ABAC9;
}

you can also delete this prop:你也可以删除这个道具:

   filterCellStyle: {
            backgroundColor: "#6ABAC9"
          }

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

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