Skip to main content

TableProps<T>

TableProps<T> = BaseTableProps & ExtendedTableProps<T> & object | PropsWithChildren<{ [K in keyof ExtendedTableProps<T>]?: never }>

Props for the Table component.

Type Parameters

T

T extends object

The type of data objects, which must include an id property of type string or number.

This type extends BaseTableProps and supports two mutually exclusive prop sets:

  1. Data Table Mode:

    • columns: An array of column definitions, one for each key in T.
    • data: An array of data objects of type T.
    • showCheckbox (optional): Whether to display a checkbox column.
    • kebabPosition (optional): Position of the kebab menu, either 'left' or 'right'.
    • persistRowActionMenu (optional): Whether to persist the kebab menu.
    • persistNumerals (optional): Whether to persist numeral columns.
    • children: Must not be provided in this mode.
  2. Custom Content Mode:

    • All table-related props (data, columns, etc.) must not be provided.
    • Allows for custom children content.

See

BaseTableProps