Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / GridViewState

Interface: GridViewState

Everything the user can change, in a JSON-safe shape. version exists so a view saved by an older build can be rejected (or migrated) rather than silently applied against a changed schema.

Properties

collapsedGroups

collapsedGroups: string[]


columnFilterParts?

optional columnFilterParts?: Record<string, Record<string, FilterNode>>

WHICH SURFACE contributed each condition — the filter row, the header popup, or an unnamed programmatic call (P3.7).

columnFilters above is the effective per-column filter and stays the authority; this is the breakdown that lets each surface show its own work again after a restore. Without it a restored view left the popup's ticks and the filter row's text both blank while the rows were plainly filtered.

Optional: a view saved before parts existed carries only the combined condition, and restoreView rebuilds a single unnamed part from it.


columnFilters

columnFilters: Record<string, FilterNode>


columns

columns: ColumnState[]


filter

filter: FilterNode | null


filterEnabled?

optional filterEnabled?: boolean

Whether the filter was being APPLIED. Optional so a view saved before this existed restores as enabled, which is what it was.


groupBy

groupBy: string[]

Grouping levels, outermost first.


page

page: number


pageSize

pageSize: number


searchText

searchText: string


sort

sort: SortDescriptor[]


version

version: 1