BetaBeta pública — Consulta las notas de lanzamiento
Documentación

Data Table

Sortable, selectable table with column control.

Paquete
@solidiom/data-table
Versión
0.0.1-next.0
Estado
stable

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

Ver código fuente

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

Ver código fuente

ColumnDefinterfaz

Column definition model.

Propiedades

accessorKey
keyof T & string — Key to access the row data value.
header
string — Header label or render function.
id
string — Unique column identifier.
sortable?
boolean — Whether this column is sortable. Default: false.

Ver código fuente

DataTableBodyPropsinterfaz

Props for the table body (tbody).

Propiedades

class?
string

hijos: Element

Ver código fuente

DataTableCellPropsinterfaz

Props for a table cell (td).

Propiedades

class?
string

hijos: Element

Ver código fuente

DataTableContextValueinterfaz

Shared reactive state and mutation requests for every DataTable part.

Propiedades

baseId
string — Generated base ID.
columns
Accessor<ColumnDef<T>[]> — Column definitions.
modelPort
TableModelPort<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.
rowIdKey
string — Row ID accessor key.
rows
Accessor<T[]> — Sorted/processed rows.
selectedRowIds
Accessor<Set<string>> — Selected row IDs.
selectionMode
RowSelectionMode — Row selection mode.
sortState
Accessor<SortState> — Current sort state.
visibleColumnIds
Accessor<Set<string>> — Visible column IDs.

Ver código fuente

DataTableHeaderCellPropsinterfaz

Props for a sortable table header cell (th).

Propiedades

class?
string
columnId
string — Column ID this header cell corresponds to.

hijos: Element

Ver código fuente

DataTableHeaderPropsinterfaz

Props for the table header (thead).

Propiedades

class?
string

hijos: Element

Ver código fuente

DataTableReasontipo

Reason for a table state change.

Ver código fuente

DataTableRootPropsinterfaz

Props for the data table root.

Propiedades

class?
string
columns
ColumnDef<T>[] — Column definitions.
data
T[] — 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) => void
rowIdKey?
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

Ver código fuente

DataTableRowPropsinterfaz

Props for a table row (tr).

Propiedades

class?
string
ref?
(el: HTMLTableRowElement) => void
rowId
string — Unique row ID. Used for selection tracking.

hijos: Element

Ver código fuente

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

Ver código fuente

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?
string
columnId
string — Column ID this header cell corresponds to.

hijos: Element

Ver código fuente

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?
string
columns
ColumnDef<T>[] — Column definitions.
data
T[] — 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) => void
rowIdKey?
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

Ver código fuente

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?
string
ref?
(el: HTMLTableRowElement) => void
rowId
string — Unique row ID. Used for selection tracking.

hijos: Element

Ver código fuente

RowSelectionModetipo

Selection mode for rows.

Ver código fuente

SortDirectiontipo

Sort direction for a column.

Ver código fuente

SortStateinterfaz

Current sort state.

Propiedades

columnId
string | null
direction
SortDirection

Ver código fuente

TableModelPortinterfaz

Port interface for delegating sort computation to an adapter. Following the adapter pattern used by calendar/carousel.

Ver código fuente