Conditional Expander in a Column in a Data Table

UI Components for React
Post Reply
kevinquinn1918
Posts: 9
Joined: 26 Aug 2020, 14:14

01 Jun 2021, 13:21

I'm using a Data Table with the expander prop. I want to make the column expander conditional. I know this can be done by

Code: Select all

<Column  expander={isNeeded ? true : false} />
But the problem is that I don't have access to the variable that I need. I need the condition to be based on the data that's in the row itself. I can make a body prop and get the data I need but then then I can't use it on the same column. Is there any way to access to actual rowdata so I can make the condition based on it?

Thanks,
Kevin

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests