View as Markdown

API reference: @salmonui/data-grid

DataGridColumnMenuOpenEventinterface

import type { DataGridColumnMenuOpenEvent } from '@salmonui/data-grid';
interface DataGridColumnMenuOpenEvent<Row> extends DataGridEvent {
    readonly field: string;
    readonly column: DataGridColumnInfo<Row>;
    readonly items: DataGridMenuItem[];
}

onBeforeColumnMenuOpen (cancellable: the menu stays closed).

DataGridColumnMenuOpenEvent members (7, 4 inherited)
NameSignatureDescription
fieldreadonly field: string;
columnreadonly column: DataGridColumnInfo<Row>;
itemsreadonly items: DataGridMenuItem[];

Mutable copy of the resolved items; edit the array in place (splice, push) to hide or add items for this column. The field itself is read-only.

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).