Replies: 1 comment
-
@tannerlinsley any insights/suggestions? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an object for a given cell:
const name = { firstname: "Rich", lastname: "Rein", address: { addressLineOne: "123 Main St", city: "Mytown", stateAbbr: "MN" } }
And so my column is defined as such:
{ Header: "Name", id: "name", accessor: "name", Cell: ({ cell, row }) => { return (<div>{cell.value.firstname} + " " + {cell.value.lastname}); ); } }
Given my table markup, I am trying to apply different static height classes to the table row based on the length of the data in the first cell - which is a trivial task for a cell containing just a string (e.g.,
const rowClass = cell.value.length > 40 ? "row-height-2" : "row-height-1";
). When my content is more complex/nested, like the above example, is there a way to get access to the rendered content coming from the cell renderer function?Things of note:
Beta Was this translation helpful? Give feedback.
All reactions