useTableGroupedRows @astryx-svelte/core v0.3.0 · Table

Usage

Hook that groups a flat data array into collapsible section rows. Each distinct groupBy value becomes a full-width section-header row with a chevron toggle, the group label, and a member count; collapsing hides that group's data rows while keeping the header visible. Mirrors useTableRowExpansionState: the consumer owns the collapsedGroups set and the hook returns {data, plugin, idKey}: pass all three to Table (data, plugins, and idKey respectively).
ts
import { Table } from '@astryx-svelte/core';

Examples

Common configurations, variations, and states.
useTableGroupedRows — Collapsible Groups
A table grouped into collapsible sections with useTableGroupedRows. Each group gets a full-width header with a chevron, label, and member count; click to collapse/expand.