Skip to content

Options

Props of MaterialHeadlessTable.

PropTypeDefault
columnsHeadlessColumnDef<TData>[]requiredRead once.
dataTData[]requiredReactive.
getRowId(row, index) => stringrow indexStable ids for selection and expansion.
enableSortingbooleantrue
enableMultiSortbooleantrueShift-click to add a sort.
enableGlobalFilterbooleantrueThe search box.
enableColumnFiltersbooleanfalseA filter under each header.
enablePaginationbooleantrueIgnored when virtualized.
enableRowSelectionbooleanfalse
enableMultiRowSelectionbooleantrue
enableColumnVisibilitybooleantrueThe columns menu.
enableColumnResizingbooleanfalse
enableColumnOrderingbooleanfalseDrag headers.
enableGroupingbooleanfalseGroup by and aggregation.
enableDensityTogglebooleantrue
enableTopToolbar, enableBottomToolbarbooleantrue
enableVirtualizationbooleanfalseSvelte Virtual List.
heightnumber | string480Scroll area height when virtualized.
estimatedRowHeightnumber53Until rows are measured.
stripedbooleanfalse
isLoadingbooleanfalseShows the progress bar.
pageSizesnumber[][10, 25, 50, 100]
topToolbarActionsSnippet<[table]>Extra toolbar controls.
emptyStateSnippetReplaces the empty message.
localizationHeadlessLocalizationEnglish
initialStatePartial<HeadlessTableState>sorting, columnFilters, globalFilter, pageIndex, pageSize, selectedRows, hiddenColumns, columnOrder, grouping, density.
onRowClick(context, event) => void
onSelectionChange(rows) => void
classes, class
bind:tableHeadlessTableInstance<TData>

The feature props (enable..., initialState, getRowId) are read when the table is created.