gregnb / mui-datatables

Datatables for React using Material-UI
MIT License
2.71k stars 932 forks source link

How to set custom class name for table scroll body? #1468

Open KhadeerUI opened 4 years ago

KhadeerUI commented 4 years ago

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Your Environment

Tech Version
Material-UI
MUI-datatables
React
browser
etc
patorjk commented 4 years ago

You can't put a class on the table's body element, but you can put one on the table using the setTableProps option:

let options = {
    setTableProps: () => ({className: 'some-class'}),
}

Then when you define your class you could target the table body:

.some-class tbody {

}