View as Markdown

API reference: @salmonui/data-grid

DataGridContextMenuItemClickEventinterface

import type { DataGridContextMenuItemClickEvent } from '@salmonui/data-grid';
interface DataGridContextMenuItemClickEvent<Row> extends DataGridEvent {
    readonly item: DataGridMenuItem;
    readonly target: DataGridContextMenuTarget;
    readonly rowIds: readonly RowId[];
    rows(): readonly Row[];
}

onContextMenuItemClick; preventDefault() skips the built-in action.

DataGridContextMenuItemClickEvent members (8, 4 inherited)
NameSignatureDescription
itemreadonly item: DataGridMenuItem;
targetreadonly target: DataGridContextMenuTarget;
rowIdsreadonly rowIds: readonly RowId[];

The target row, or the selection when the target row is selected; empty for header and pager targets. Lazy.

rowsrows(): readonly Row[];

Row objects of rowIds.

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