Custom render causing issue while exporting the data in CSV
z-kushal opened this issue · comments
Hey, i am facing the same problem. for some reason it is exporting some of the column with custom render and some of the column is not being exported properly.
{
title: 'Status',
field: 'status',
render: (device: Idevice) => {
return (
<div className="devicesStatus">
<img src={getStatusImg(device?.status)} />
<i>{device?.status}</i>
</div>
)
}
},
//! Does not export data in CSV
{
title: 'Unit',
field: 'unit',
sorting: false,
render: (device: Idevice) => {
monitoredUnits.find((monitoredUnit: any) => {
return monitoredUnit.attachedDeviceId === device.id
})?.localId ?? 'N/A'
}
},
{
title: 'Connectivity',
field: 'rssi',
render: (device: Idevice) => <AppWifiSignal level={Number(device.rssi)} />
},
{
title: 'Last update',
field: 'lastKeepAlive',
render: (device: Idevice) => getDateByLocalTimeZone(device.lastKeepAlive)
}
As you can see i have different custom renders but only Unit column is not exporting. Why.? Any possible solution of it.?
And yes, table is showing the data on the browser, but whil exporting it, it is exporting empty column.
Originally posted by @z-kushal in #543 (comment)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.