Skip to content

Sticky footer (bottom page) & Hide expand subrows icon (if no children) #218

Answered by KevinVandy
mkosir asked this question in Q&A
Discussion options

You must be logged in to vote

You can use the muiExpandButtonProps prop to add your own CSS to those expand buttons

Something like:

<MaterialReactTable 
  //...
  muiExpandButtonProps={({ row }) => ({
     sx: {
      display: row.subrows?.length ? 'flex' : 'none'
    }
  })
/>

As for the footer, have you seen the enableStickyFooter prop? Docs here https://www.material-react-table.com/docs/guides/sticky-header

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@tluyben
Comment options

Answer selected by mkosir
Comment options

You must be logged in to vote
1 reply
@KevinVandy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants