gregnb / gregnb/mui-datatables

Get row object from customBodyRender

Open
#940 6 comments 6 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

Sorry if this has been asked before..

I created a custom column definition below

`{
name: "",
label: "Action",
options: {
filter: true,
sort: true,
customBodyRender: (value, tableMeta, updateValue) => {
return (

);
}
}
}`

Where Action_DataTable is a custom widget that provides the edit, view and delete button functionality for the application that we're building.. I've checked on the tableMeta.rowData, but the data provided was just array of values which basically can be extracted from the row object using Object.values(). Is there a way for me to get the original row object instead?

What i got was --> [ a, b, c, d ], but what i want is actually { propertyA: a, propertyB: b, propertyC: c, propertyD: d }

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.