0

Am using PrimeReact DataTable in my React application.I have a requirement to change the background colour from white to grey in the DataTable..I tried custom style in the component. But not working.. Can you please help me?

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
vivek v
  • 167
  • 1
  • 3
  • 16

1 Answers1

1

If you want to override the style of the Datatable then use this css

.p-datatable-tbody tr {
  background: gray !important;
}

or, in order to avoid !important

.p-datatable .p-datatable-tbody > tr {
  background: gray
}
Apostolos
  • 10,033
  • 5
  • 24
  • 39