Search code examples
reactjsmaterial-uimaterial-table

Material-table for react


I use material-ui for my project. And for data tables I use material-table. material-ui basic table has prop "stickyHeader" which fixes the table header while scrolling table body. I need the same thing for material-table but I can not find anything like it.

I tried to do it with custom css but my table becomes dependant on the layout. Is there any simple solution to have fixed footer and header for my material-table ?


Solution

  • You can use options.maxBodyHeight to make material-table sticky header. But there is no solution for fixed footer for now.

     options={{
            maxBodyHeight: 200
          }}