So, I am getting the data from an API, and I display this data in React Table. One of the columns in the Table is a date and I run special function to display the date in readable format on accessor property in React Table, but I want to run the same function in Cell property. When I run the function on Cell property i get empty cells.
return [
{
Header: t('textCreatives:table.creationDate'),
accessor: Accessor.timeFormat('createdAt'),
className: 'text-nowrap',
},
{
Header: t('textCreatives:table.offers'),
accessor: Accessor.idWithNameFormat('offer.id', 'offer.name'),
className: 'text-nowrap',
},
]
When I add Cell property to the Table I get an empty cell
return [
{
Header: t('textCreatives:table.creationDate'),
accessor: 'createdAt',
className: 'text-nowrap',
Cell: (prop) => Accessor.timeFormat(prop.value)
},
{
Header: t('textCreatives:table.offers'),
accessor: Accessor.idWithNameFormat('offer.id', 'offer.name'),
className: 'text-nowrap',
},
]
Can someone assist me with this issue?