Replies: 3 comments
|
Hi, have you found the answer? |
0 replies
|
You could extract a computed full-name value like so: columnHelper.accessor(row => `${row.firstName} ${row.lastName}`, {
id: 'fullName',
})
// OR
{
id: 'fullName',
accessorFn: row => `${row.firstName} ${row.lastName}`,
} |
0 replies
|
anyone found any answer on how to do it? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have following randomly generated Person(s) data:
[ { "id": 1, "first_name": "Salaidh", "last_name": "Vanyakin", "email": "svanyakin0@cnn.com", "gender": "Female", "ip_address": "34.109.55.78", "phone": "719-928-4414", "date": "5/10/2023" }, { "id": 2, "first_name": "Gordy", "last_name": "Ducker", "email": "gducker1@mlb.com", "gender": "Male", "ip_address": "252.195.50.9", "phone": "615-398-4252", "date": "5/29/2023" } ]with the following
PersontypeI am trying to create a column definition using a
ColumnHelperthat combinesfirst_nameandlast_nameinto a single column which creates a new column,full_name, but ain't sure what the best way to achieve this.The current solution I chose is to create an another type like:
and build column definition based on that:
Any suggestions, please?
Thank you!
All reactions