ChemPare Documentation - v0.0.0
    Preparing search index...

    Interface SearchTableProps<TData>

    Props interface for the SearchTable component. Generic type parameter TData represents the type of data being displayed in the table.

    interface SearchTableProps<TData> {
        data: TData[];
        columns: ColumnDef<TData>[];
        renderSubComponent: (props: { row: Row<TData> }) => ReactElement;
        getRowCanExpand: (row: Row<TData>) => boolean;
        rerender: () => void;
        refreshData: () => void;
        columnFilterFns: [ColumnFiltersState, OnChangeFn<ColumnFiltersState>];
    }

    Type Parameters

    • TData
    Index

    Properties

    data: TData[]

    Array of data items to display in the table

    columns: ColumnDef<TData>[]

    Array of column definitions that specify how to display each column

    renderSubComponent: (props: { row: Row<TData> }) => ReactElement

    Function to render a sub-component for expandable rows

    getRowCanExpand: (row: Row<TData>) => boolean

    Function to determine if a row can be expanded

    rerender: () => void

    Function to trigger a re-render of the table

    refreshData: () => void

    Function to refresh the table data

    columnFilterFns: [ColumnFiltersState, OnChangeFn<ColumnFiltersState>]

    Tuple containing the current column filter state and a function to update it