Skip to content

co-data-table

This content is not available in your language yet.

Ver código
<co-data-table></co-data-table>

Props

PropAtributoTipoDefaultDescripción
columnscolumnsCoDataTableColumn[] | string'[]'Column definitions (JSON string or array)
emptyIconempty-iconstring'magnifying-glass'Empty state icon (Phosphor icon name).
emptyMessageempty-messagestring'No records found'Empty state secondary message (description).
emptyTitleempty-titlestring''Empty state title (bold heading). Optional — falls back to just the message.
loadingloadingbooleanfalseShow loading skeleton
resizableresizablebooleantrueEnable column resizing
rowKeyrow-keystring'_id'Field used as unique row identifier
rowsrowsany[] | string'[]'Row data (JSON string or array)
selectableselectablebooleanfalseEnable row selection with checkboxes
selectedKeysselected-keysstring | string[]'[]'Keys of currently selected rows (JSON string or array)
skeletonRowsskeleton-rowsnumber10Number of skeleton rows to display
sortFieldsort-fieldstring''Current sort field
sortOrdersort-order"" | "asc" | "desc"''Current sort direction

Eventos

EventoDetailBubblesCancelableDescripción
coColumnPin{ field: string; }Emitted when a column pin (sticky) is requested
coColumnResize{ field: string; width: number; }Emitted when a column is resized
coRowClick{ row: any; index: number; }Emitted when a row is clicked
coRowDblClick{ row: any; index: number; }Emitted when a row is double-clicked
coRowSelect{ key: string; selected: boolean; }Emitted when a row is selected/deselected
coSelectAll{ selected: boolean; }Emitted when select-all checkbox toggles
coSort{ field: string; order: "desc" | "asc"; }Emitted when a column sort is requested

Slots

SlotDescripción
(default)Default slot for custom row content (advanced usage)

CSS Parts

PartDescripción
::part(empty)

CSS Custom Properties

Este componente no expone CSS custom properties.