【问题标题】:Can't remove white header in react-data-table-component无法删除 react-data-table-component 中的白色标题
【发布时间】:2020-12-14 19:25:51
【问题描述】:

我正在尝试删除 react-data-table-component 标题中的白色背景。

我也可以完全删除标题,但也不知道如何。

在我的表格组件代码下面

    <DataTable                                  
        className="dataTables_wrapper"
        columns={this.columns()}
        data={data}
        progressPending={loading}
        pointerOnHover
        />

我试图用这个 css 代码改变组件的样式,但它似乎不起作用...

.dataTables_wrapper .rdt_TableHeader {
    background-color: blue
    color: blue;
}
.dataTables_wrapper .rdt_TableHead {
    background-color: blue;
    color: blue;
}

Example of how my table looks right now

【问题讨论】:

    标签: javascript css reactjs react-data-table-component


    【解决方案1】:

    你可以使用 noHeader 属性。

     <DataTable                                  
        className="dataTables_wrapper"
        columns={this.columns()}
        data={data}
        progressPending={loading}
        pointerOnHover
        noHeader={true}
        />
    

    Documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-19
      • 2023-04-07
      • 2023-01-09
      • 1970-01-01
      • 1970-01-01
      • 2020-09-28
      • 1970-01-01
      • 2022-09-25
      相关资源
      最近更新 更多