-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to pass row data into formatter #42
Comments
we'll track this under #41 as they will have a common solution. |
👍 |
I used this |
thanks @maiis, Just what i was looking for. |
Yeah its great solution but I needed header info also. Is there any solution for the same? |
I've been 2 hours searching for this!!! |
If I use the above column definition what does the static propTypes {} look like? |
It should be well documented 👍 |
Where |
Holy crap, I looked for this crap for almost 2 hours. This documentation is the worst i've seen. |
Yes, such a pity, since the library is very cool... |
Damn! @maiis you just saved me tons of time! |
Having the same issue, couldn't replicate the provided solution using Instead I'm using a function but I can't view the row data. let columns = [
...
{
id: 'status',
name: 'Status',
getRowMetaData: (row) => row,
formatter: (_s, _o, rowObject) => _(renderStatus(rowObject)),
},
...
]; const renderStatus = (rowObject) => {
console.log(rowObject.getRowMetaData); // Returns the string "row => row"
return <StatusTest myVar={rowObject} />;
};
|
In case anyone still searching for this, we can access row data with params.row for custom rendering which depends on other row data
|
I had a case where I needed to access others row values inside a cell formatter. Maybe be worth documenting it ?
This is how I achieved it.
In into my formatter I can access all the row values into this.props.dependentValues
The text was updated successfully, but these errors were encountered: