Hex Core JS
    Preparing search index...

    Type Alias TableProps<C>

    TableProps: {
        columns: C[];
        columnWidths?: Partial<Record<C, string>>;
        minColumnWidth?: string;
        noScroll?: boolean;
        scrollSyncID?: any;
    } & (
        | {
            sortColumn: string
            | null;
            sortIsAsc: boolean;
            updateSort: (column: C) => void;
        }
        | { sortColumn?: undefined; sortIsAsc?: undefined; updateSort?: undefined }
    ) & Partial<GapProps> & Partial<ClassNameProps & StyleProps & ChildrenProps>

    Type Parameters

    • C extends string

    Type Declaration

    • columns: C[]

      Ordered list of displayed columns.

    • OptionalcolumnWidths?: Partial<Record<C, string>>

      Widths of each of the columns (default for each column is 1fr, only non-default values need to be specified). Used by each <Table.Row> component which has CSS display: grid, so any allowed values for column widths in CSS grid-template-columns is allowed.

    • OptionalminColumnWidth?: string

      A minimum width for each column (a CSS length value). Used to populate default values for columnWidths if not provided or for missing keys. If provided, default column width values become minmax([minColumnWidth], 1fr).

    • OptionalnoScroll?: boolean

      Prevent scrolling within the table.

    • OptionalscrollSyncID?: any

      A value that when updated causes scrolling to the top of the table. Can be updated, for example, in response to pagination changes or filtering.

    • {
          sortColumn: string | null;
          sortIsAsc: boolean;
          updateSort: (column: C) => void;
      }
    • { sortColumn?: undefined; sortIsAsc?: undefined; updateSort?: undefined }