Skip to main content

columns

To define the columns of the table

  • optional (you can render a table without the header)
  • Type: string[] or TColumn[]
new Paginator({
columns: ['Name', 'Email', 'Phone Number'],
});

or

new Paginator({
columns: [
{
name: 'Name',
},
{
name: 'Email',
},
{
name: 'Phone Number',
},
],
});

TColumn type has the following properties:

NameDescriptionTypeExample
id optionalColumn IDstringphoneNumber
data optionalCell default datafunction or TCell(row) => row.name.firstName or myData
nameColumn namestringName
hidden optionalTo show/hide the columnbooleantrue or 0
formatter optional(For plugin) Custom cell formattingfunction(cell: TCell, row: Row<TCell>, column: TColumn) => ComponentChild;
info

See Cell formatting example for more details.