Examples › Default column render
If you provide a defaultColumnRender function to the DataTable, it will be used to render the cells of all columns that don’t have their own render function.
The defaultColumnRender function receives the current record, its index in records and the column accessor as arguments, and should return a ReactNode.
In the example below, a single function renders strings as they are and dates as relative time intervals, so the columns don’t need individual render functions:
No records
Here is the code for the above example:
Head over to the next example to learn more.














