Skip to content

How can I change the color of a row with a column condition? #340

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

You must be logged in to vote

See both the Column Instance API Docs and the Row Instance API docs. You can pass props to each row conditionally with the muiTableBodyRowProps prop like so

<MaterialReactTable
  muiTableBodyRowProps={({ column, row }) => ({
    //props, conditional on column and row apis
  })
/>

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@RonalSilve
Comment options

@mcadotsch
Comment options

@KevinVandy
Comment options

@mcadotsch
Comment options

Answer selected by RonalSilve
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