Package-level declarations
Types
Aggregation function for a grouped column. Receives the column id, the leaf rows of the group and the immediate child rows (or sub-aggregations when grouping deeper than one level), and returns the aggregated value.
Choice of aggregation function. Either "auto", the name of a built-in or registered fn (a String), or an AggregationFn value. Typed as Any? because Kotlin cannot model that mixed union.
Marker interface for a caller-registered set of aggregation functions.
Name of a built-in aggregation function. Modelled as String because Kotlin cannot express a closed union of string literals — the names accepted at runtime are the keys of aggregationFns.
Name of a built-in filter function. Modelled as String because Kotlin cannot express a closed union of string literals.
Name of a built-in sort function. Modelled as String because Kotlin cannot express a closed union of string literals — the names accepted at runtime are the keys of sortingFns.
Context object passed to cell renderers. Carries the cell, its column, row and owning table, plus value accessors. getValue returns the raw cell value, while renderValue returns the value or the configured renderFallbackValue when null.
Definition of a column. Carries the identifier (id/header), the accessor (accessorKey or accessorFn), nested columns for group columns, plus the feature-specific configuration (enableSorting, filterFn, size, ...). All fields are nullable; which fields you set determines what kind of column you build.
Cell/header template. At runtime either a String or a (props) -> Any? renderer; consuming code (e.g. flexRender in the adapter layer) discriminates by runtime type.
The ColumnFaceting feature. Installs the per-column facet accessors on each Column when registered with the table.
One entry in ColumnFiltersState. id identifies the column; value is the raw filter value submitted by the caller (later normalised by the column's FilterFn.resolveFilterValue).
The ColumnFiltering feature. Adds columnFilters state, the column- level filter accessors (getFilterFn, getIsFiltered, ...) and the table-level setColumnFilters / resetColumnFilters / getFilteredRowModel.
Ordered list of active per-column filter entries.
The ColumnGrouping feature. Adds grouping state, the column-level grouping accessors (toggleGrouping, getIsGrouped, ...) and the table-level setGrouping / resetGrouping / getGroupedRowModel.
Typed helper for building column defs. The accessor member accepts either an AccessorFn or an accessor-key String and produces the corresponding accessor column def; display and group are the identity for symmetry with the JS API.
Identifier shape on a column def — either IdIdentifier or StringHeaderIdentifier. Typed as Any? because Kotlin cannot express the union directly.
Marker interface for caller-supplied per-column metadata.
The ColumnOrdering feature. Adds columnOrder state, the table-level setter/reset, the per-column getIndex/getIsFirstColumn/ getIsLastColumn accessors, and the ordering function used to build leaf column lists.
Ordered list of column ids that drive table column order. Columns not mentioned here retain their natural order.
The ColumnPinning feature. Adds columnPinning state, the column- level pin/getIsPinned/getPinnedIndex accessors, and the row/table partitioning into left, center and right pinned sections.
Pinned position for a column. Either "left", "right", or the literal false (unpinned). Typed as Any? because Kotlin cannot express that mixed union directly.
Pinned-column ids partitioned by position. Both lists default to null (no columns pinned in that position).
Resize-direction hint: "ltr" or "rtl".
When the new column size is committed: "onChange" (live) or "onEnd" (on gesture end).
The ColumnSizing feature. Adds columnSizing / columnSizingInfo state, the column-level size/resize accessors, and the header-level resize handler.
Transient state captured during a column resize gesture. All fields are null when no resize is in progress; isResizingColumn holds the column id (or false) when one is.
Per-column rendered size in pixels, keyed by column id. Missing entries fall back to the column def's size.
One entry in SortingState. id identifies the column; desc is the direction (true for descending).
The ColumnVisibility feature. Adds columnVisibility state plus the column-, row- and table-level visibility members.
Caller-registered aggregation functions, keyed by name.
Defaults applied to columns that do not set their own sizing fields.
Expansion state. Either the literal true (every row expanded) or a Map of row-id to flag (most rows collapsed by default). Modelled as Any? because Kotlin cannot express that union directly; the feature code discriminates by runtime type.
Per-row expansion flags. An entry's value indicates whether the row is expanded; missing rows are collapsed.
Callable filter function for a column. invoke returns true to keep the row, false to filter it out, and may push per-row metadata via addMeta. Implementations may override autoRemove and resolveFilterValue when needed.
Marker interface for a caller-registered set of filter functions.
Marker interface for caller-supplied filter-side metadata.
Options accepted by getPaginationRowModel. Currently only initialSync is defined; it is reserved for future use and not read by the builder.
The GlobalFaceting feature. Wires the global facet accessors onto each Table when installed.
The GlobalFiltering feature. Adds global-filter state, options and the Table/Column accessors that drive it.
Where the grouped column appears in the table: "reorder", "remove", or null. Typed as Any? for the same reason as AggregationFnOption.
Ordered list of grouped column ids — primary grouping first.
A column header cell. Combines the core header members with the ColumnSizing feature members (getResizeHandler/getSize/getStart).
A row of Headers — one entry per level in the header tree. headers is mutated during construction by buildHeaderGroups.
Column-identifier shape: an explicit id with optional header template.
All-optional counterpart of TableState. Pass to options.initialState to seed the table; absent slices default to their TableState defaults.
Options bag for memo / memoWithArg.
Setter signature: accepts either a new value or a function (old) -> new.
Pagination state: zero-based pageIndex and the page size in rows.
A column filter resolved against its column — carries the column id, the resolved filter fn, and the post-FilterFn.resolveFilterValue value. Used internally by the filtering pipeline.
The RowExpanding feature. Adds expanded state, the row-level expansion accessors and the table-level setExpanded / toggleAllRowsExpanded / getExpandedRowModel.
The RowPagination feature. Adds pagination state, the page-navigation accessors (nextPage, previousPage, setPageIndex, setPageSize, ...) and the paginated row-model accessor.
The RowPinning feature. Adds rowPinning state, the row-level pin / getIsPinned / getCanPin / getPinnedIndex accessors, and the table-level partitioning into top, center and bottom rows.
Pinned position for a row. Either "top", "bottom", or the literal false (unpinned). Typed as Any? because Kotlin cannot express that mixed union directly.
Pinned-row ids partitioned by position. Both lists default to null (no rows pinned in that position).
The RowSelection feature. Adds rowSelection state, the row-level accessors (getIsSelected, toggleSelected, ...) and the table-level setRowSelection / toggleAllRowsSelected / getIsAllRowsSelected / getSelectedRowModel.
Per-row selection flags. An absent entry means "unselected".
Options accepted by Row.toggleSelected. selectChildren controls whether the toggle cascades to sub-rows; null leaves the default in place.
The RowSorting feature. Adds sorting state, the column-level sort accessors (getSortingFn, getIsSorted, toggleSorting, ...) and the table-level setSorting / resetSorting / getSortedRowModel.
Sort direction. One of "asc" or "desc" at runtime; modelled as String because Kotlin cannot express a closed union of string literals.
Marker interface for a caller-registered set of sort functions.
Ordered list of ColumnSort entries. Order is significant: entry 0 is the primary sort key.
Column-identifier shape: a string header with optional id.
Header template — a String or a (HeaderContext) -> Any? renderer.
Extension point for table features. Each non-null member is invoked during the corresponding construction step:
Caller-facing alias for TableOptionsResolved. The two are structurally identical because every field on TableOptionsResolved is either nullable or carries a default, so a caller can construct one supplying only the options they care about.
The unified table-state container. Carries one field per feature slice (columnVisibility, columnOrder, columnPinning, ...). Each field defaults to its slice's canonical empty value; an immutable InitialTableState supplied by the caller overlays them at table construction time.
Either a new value or a function (old) -> new that produces one. Resolved by functionalUpdate at the call site. Typed as Any? because Kotlin cannot express the underlying union.
Per-column visibility flags. An absent entry means "visible".
Properties
The set of built-in aggregation functions, keyed by name. Iteration order is preserved.
Case-insensitive alphanumeric comparator. Splits each value on digit runs, then compares pairwise: digit runs numerically, text runs lexicographically.
Case-sensitive variant of alphanumeric.
Tests whether the cell value (a list) contains filterValue.
Tests whether the cell value (a list) contains every element of filterValue.
Tests whether the cell value (a list) contains any element of filterValue.
Returns the number of leaf rows.
Date/time comparator. Tolerates nullish values and supports any operand type that surfaces as a numeric epoch value or implements Comparable (an ISO date string, a platform date type that implements Comparable, ...). Opaque non-Comparable date objects cannot be ordered by this comparator — configure a custom sortingFn in that case.
Shared DefaultColumnSizing instance used by ColumnSizing and ColumnDef.fromDefaultSizing.
Case-insensitive whole-string equality.
Returns listOf(min, max) across child rows. Each entry is Double?, null when no numeric values were seen. NaN values are skipped.
Case-insensitive substring filter. Stringifies both the cell value and the filter value before comparing. A nullish cell value short-circuits to false.
Case-sensitive variant of includesString.
Range filter for numeric cell values. filterValue is a [min, max] pair; non-numeric / null bounds become -Infinity / +Infinity, and an inverted pair is swapped.
Returns the maximum numeric value across child rows, or null if no numeric values are present. NaN values are skipped.
Returns the arithmetic mean of numeric leaf-row values, or null if no numeric values are present. Non-numeric values coerce to NaN and are filtered out by the value >= value self-comparison.
Returns the median of numeric leaf-row values. Returns null for an empty input or when any value is non-numeric. For an even count, returns the average of the two middle elements.
Returns the minimum numeric value across child rows, or null if no numeric values are present. NaN values are skipped (matching the value >= value self-comparison guard).
Splits on digit runs, capturing the runs so they survive the split — used by the alphanumeric comparator below. The capturing group is significant: splitKeepingDelimiters relies on the same alternating-segment shape.
The set of built-in sort functions, keyed by name. Iteration order matches insertion order.
Sums numeric child-row aggregations. Non-numeric values contribute zero. Adds aggregations directly rather than walking leaf rows for speed.
Case-insensitive text comparator. More basic than alphanumeric (less numeric support) but much faster.
Case-sensitive variant of text.
Returns the distinct leaf-row values in first-insertion order.
Returns the count of distinct leaf-row values.
Loose equality between the cell value and filterValue using JavaScript == semantics (type coercion for cross-type primitive comparisons). ToPrimitive coercion of arbitrary objects is not reproduced — object operands fall back to reference equality.
Functions
Returns the visible leaf columns for position, where position is null / false (all visible columns), "center", "left" or "right". Modelled with Any? because the original union mixes the literal false with string literals.
Builds a TableState by first running applyDefaults on a fresh default-filled state, then overlaying every slice present on state.
Field-by-field shallow copy of options. Used by createTable to seed its defaults accumulator with the caller's required-field values before feature getDefaultOptions fragments are layered on.
Constructs a Column from columnDef. Resolves the def against the table's default column def (per-field merge — only non-null fields on columnDef override the defaults), derives an id from id/accessorKey/string header, builds an accessor function for accessor-key/-fn columns, installs the memoised getFlatColumns and getLeafColumns, and runs every registered feature's createColumn hook.
Creates a ColumnHelper for rows of TData. Use the helper's accessor / display / group factories to build ColumnDefs for a table.
Builds the per-column faceted-unique-values factory. The returned function is invoked once per (table, columnId) pair and produces a memoised getter for a value -> count map. Iteration order matches the order each value was first seen.
Builds a MemoOptions from a debug level ("debugAll", "debugCells", "debugTable", "debugColumns", "debugRows", "debugHeaders") and a memo key. The debug callback reports whether the relevant debug flag is enabled; debugAll takes priority over the per-area flag.
Returns true when d is a function value (any arity).
Returns a setter that updates one TableState field by key, applying functionalUpdate to merge new values. Used by feature getDefaultOptions implementations to wire onXxxChange callbacks to setState.
Field-by-field merge of a and b, with b winning. Delegates to TableOptionsResolved.merge — see its KDoc for per-field semantics.
Returns _document when it is truthy, otherwise null. Mirrors the JavaScript helper that would fall back to the global document binding; commonMain has no such global, so the fallback always yields null.
Returns the ownerDocument of the event's target, when reachable. The required browser-DOM accessors are not available in commonMain, so this always returns null — the same value the original guard chain returns whenever the target or its ownerDocument is missing.
Materialises an InitialTableState into a TableState: every slice the caller supplied is copied across; missing slices fall back to the TableState defaults. A null receiver yields a fully-defaulted state.