Data Table
Sortable, selectable table with column control.
Generado a partir del código fuente público del paquete.
API
Bodycomponente
@solidiom/data-table — Headless sortable data table primitive. Parts: Root (table), Header (thead), HeaderCell (th), Body (tbody), Row (tr), Cell (td).
Body(props: DataTableBodyProps): Element
Propiedades
class?string
hijos: Element
Cellcomponente
@solidiom/data-table — Headless sortable data table primitive. Parts: Root (table), Header (thead), HeaderCell (th), Body (tbody), Row (tr), Cell (td).
Cell(props: DataTableCellProps): Element
Propiedades
class?string
hijos: Element
ColumnDefinterfaz
Column definition model.
Propiedades
accessorKeykeyof T & string— Key to access the row data value.headerstring— Header label or render function.idstring— Unique column identifier.sortable?boolean— Whether this column is sortable. Default: false.
DataTableBodyPropsinterfaz
Props for the table body (tbody).
Propiedades
class?string
hijos: Element
DataTableCellPropsinterfaz
Props for a table cell (td).
Propiedades
class?string
hijos: Element
DataTableContextValueinterfaz
Shared reactive state and mutation requests for every DataTable part.
Propiedades
baseIdstring— Generated base ID.columnsAccessor<ColumnDef<T>[]>— Column definitions.modelPortTableModelPort<T> | undefined— Table model port for sorting delegation.requestSelectionChange(ids: Set<string>, details: ChangeDetails<DataTableReason>) => void— Request row selection change.requestSortChange(state: SortState, details: ChangeDetails<DataTableReason>) => void— Request sort state change.requestVisibilityChange(ids: Set<string>, details: ChangeDetails<DataTableReason>) => void— Request column visibility change.rowIdKeystring— Row ID accessor key.rowsAccessor<T[]>— Sorted/processed rows.selectedRowIdsAccessor<Set<string>>— Selected row IDs.selectionModeRowSelectionMode— Row selection mode.sortStateAccessor<SortState>— Current sort state.visibleColumnIdsAccessor<Set<string>>— Visible column IDs.
DataTableHeaderCellPropsinterfaz
Props for a sortable table header cell (th).
Propiedades
class?stringcolumnIdstring— Column ID this header cell corresponds to.
hijos: Element
DataTableHeaderPropsinterfaz
Props for the table header (thead).
Propiedades
class?string
hijos: Element
DataTableReasontipo
Reason for a table state change.
DataTableRootPropsinterfaz
Props for the data table root.
Propiedades
class?stringcolumnsColumnDef<T>[]— Column definitions.dataT[]— Row data.defaultSelectedRowIds?Set<string>— Default selected row IDs.defaultSortState?SortState— Default sort state for uncontrolled mode.defaultVisibleColumnIds?Set<string>— Default visible column IDs. Defaults to all columns.modelPort?TableModelPort<T>— Table model port for sort delegation.onSelectionChange?(ids: Set<string>, details: ChangeDetails<DataTableReason>) => void— Called when row selection changes.onSortChange?(state: SortState, details: ChangeDetails<DataTableReason>) => void— Called when sort state changes.onVisibilityChange?(ids: Set<string>, details: ChangeDetails<DataTableReason>) => void— Called when column visibility changes.ref?(el: HTMLTableElement) => voidrowIdKey?string— Key in each row used as unique row ID.selectedRowIds?Accessor<Set<string>>— Controlled selected row IDs.selectionMode?RowSelectionMode— Row selection mode. Default: "none".sortState?Accessor<SortState>— Controlled sort state.visibleColumnIds?Accessor<Set<string>>— Controlled visible column IDs.
hijos: Element
DataTableRowPropsinterfaz
Props for a table row (tr).
Propiedades
class?stringref?(el: HTMLTableRowElement) => voidrowIdstring— Unique row ID. Used for selection tracking.
hijos: Element
Headercomponente
@solidiom/data-table — Headless sortable data table primitive. Parts: Root (table), Header (thead), HeaderCell (th), Body (tbody), Row (tr), Cell (td).
Header(props: DataTableHeaderProps): Element
Propiedades
class?string
hijos: Element
HeaderCellcomponente
@solidiom/data-table — Headless sortable data table primitive. Parts: Root (table), Header (thead), HeaderCell (th), Body (tbody), Row (tr), Cell (td).
HeaderCell(props: DataTableHeaderCellProps): Element
Propiedades
class?stringcolumnIdstring— Column ID this header cell corresponds to.
hijos: Element
Rootcomponente
@solidiom/data-table — Headless sortable data table primitive. Parts: Root (table), Header (thead), HeaderCell (th), Body (tbody), Row (tr), Cell (td).
Root(props: DataTableRootProps<T>): Element
Propiedades
class?stringcolumnsColumnDef<T>[]— Column definitions.dataT[]— Row data.defaultSelectedRowIds?Set<string>— Default selected row IDs.defaultSortState?SortState— Default sort state for uncontrolled mode.defaultVisibleColumnIds?Set<string>— Default visible column IDs. Defaults to all columns.modelPort?TableModelPort<T>— Table model port for sort delegation.onSelectionChange?(ids: Set<string>, details: ChangeDetails<DataTableReason>) => void— Called when row selection changes.onSortChange?(state: SortState, details: ChangeDetails<DataTableReason>) => void— Called when sort state changes.onVisibilityChange?(ids: Set<string>, details: ChangeDetails<DataTableReason>) => void— Called when column visibility changes.ref?(el: HTMLTableElement) => voidrowIdKey?string— Key in each row used as unique row ID.selectedRowIds?Accessor<Set<string>>— Controlled selected row IDs.selectionMode?RowSelectionMode— Row selection mode. Default: "none".sortState?Accessor<SortState>— Controlled sort state.visibleColumnIds?Accessor<Set<string>>— Controlled visible column IDs.
hijos: Element
Rowcomponente
@solidiom/data-table — Headless sortable data table primitive. Parts: Root (table), Header (thead), HeaderCell (th), Body (tbody), Row (tr), Cell (td).
Row(props: DataTableRowProps): Element
Propiedades
class?stringref?(el: HTMLTableRowElement) => voidrowIdstring— Unique row ID. Used for selection tracking.
hijos: Element
RowSelectionModetipo
Selection mode for rows.
SortDirectiontipo
Sort direction for a column.
SortStateinterfaz
Current sort state.
Propiedades
columnIdstring | nulldirectionSortDirection
TableModelPortinterfaz
Port interface for delegating sort computation to an adapter. Following the adapter pattern used by calendar/carousel.