How can we configure the Header of ant design table component?

后端 未结 2 482
醉酒成梦
醉酒成梦 2020-12-10 17:48

We have requirement where we need to show \'Hide/Show\' columns feature on the header of table and also we want to provide different color to the header of table in ant desi

2条回答
  •  孤街浪徒
    2020-12-10 18:38

    What I tried to resolve the background colour issue of header is overwrite the ant style class as below

    thead[class*="ant-table-thead"] th{
      background-color: yellow !important;
    }
    

    I am not sure if this is the correct way of doing or not. antd should provide the property on Table to configure the header style.

    Is there any other better way to do it?

提交回复
热议问题