0

I need to override the default black text color when sorting a column, I'm not sure how to do it. The closest I got was to change the arrow icon color using the snippet below.

 MUIDataTableHeadCell: {
        sortAction: {
            '& path': {
              color: "teal " // or whatever you need
            }, 
            }, 
      }, 

Does anyone have an idea how can I change the text color too? :)

4

1 回答 1

1

This should do the trick!

 MUIDataTableHeadCell: {
    sortAction: {
        '& path': {
          color: "teal " // or whatever you need
        }, 
     }, 
    sortActive: {
      color: ""  // whatever you need
    }
  }, 

sortActive = Header Text Color

于 2021-01-11T07:05:18.513 回答