Search code examples
reactjsantd

Change the background of the Row containing the column headings in Table component of ANTD


I am using the ANTD Table Component and I just need to change the background of the Row that contains the headings of the columns.

<Table
  dataSource={tableData}
  columns={columns}
  pagination={false}
  tableLayout="auto"
/>

I want to change the background color of the columns of the Table.

How can I do that?


Solution

  • you can change the using this class on your css file:

    th.ant-table-cell {
      background-color: aqua !important;
    }
    

    it's not a good practice use important, but i think don't have another way