Good evening, I was wondering if is it possible to render custom component inside a table instead of
"No data" text when table is empty or when data is fetching from backend.
Any help will be appreciated!
Hi,
You can use the noDataRowComponent/noDataCellComponent property to complete this task (see Table Plugins).
I've also created an example to illustrate a basic implementation of this idea
https://stackblitz.com/edit/react-5kyinp
See also
Fundamentals - Appearance Customization
Improved code:
({ colSpan }) => (
<td colSpan={colSpan} style={{ textAlign: 'center' }}>
<big className="TableNoDataCell">Empty Data</big>
</td>
)
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.
Most helpful comment
Hi,
You can use the noDataRowComponent/noDataCellComponent property to complete this task (see Table Plugins).
I've also created an example to illustrate a basic implementation of this idea
https://stackblitz.com/edit/react-5kyinp
See also
Fundamentals - Appearance Customization