View as Markdown

API reference: @salmonui/data-grid

DataGridGroupToggleEventinterface

import type { DataGridGroupToggleEvent } from '@salmonui/data-grid';
interface DataGridGroupToggleEvent<Row> extends DataGridEvent {
    readonly groupId: RowId;
    readonly path: readonly GroupPathSegment[];
    readonly key: GroupRowSnapshot['key'];
    readonly expanded: boolean;
    readonly lazy: boolean;
    rows(): readonly Row[];
}

onBeforeGroupToggle / onGroupToggle (lazy and eager groups).

DataGridGroupToggleEvent members (10, 4 inherited)
NameSignatureDescription
groupIdreadonly groupId: RowId;
pathreadonly path: readonly GroupPathSegment[];
keyreadonly key: GroupRowSnapshot['key'];
expandedreadonly expanded: boolean;

The state after the toggle (proposed in the before-event).

lazyreadonly lazy: boolean;

True in lazy mode.

rowsrows(): readonly Row[];
typeinheritedtype: string;

'sortChange', 'beforeSortChange', ...

sourceinheritedsource: DataGridEventSource;
defaultPreventedinheriteddefaultPrevented: boolean;

True after preventDefault() (before-events and click events).

preventDefaultinheritedpreventDefault: () => void;

Before-events and click events: cancels the action (or the built-in behavior).