API reference: @salmonui/data-grid
DataGridMenuIteminterface
import type { DataGridMenuItem } from '@salmonui/data-grid';interface DataGridMenuItem {
readonly id: string;
readonly label?: string;
readonly icon?: ReactNode;
readonly disabled?: boolean;
readonly disabledReason?: string;
readonly checked?: boolean;
readonly separator?: boolean;
readonly items?: readonly DataGridMenuItem[];
readonly render?: () => ReactNode;
readonly href?: string;
readonly target?: string;
readonly targets?: readonly DataGridContextMenuTarget['kind'][];
}
| Name | Signature | Description |
|---|---|---|
id | readonly id: string; | Built-in id or a custom id (reported in click events). |
labeloptional | readonly label?: string; | |
iconoptional | readonly icon?: ReactNode; | Decorative icon (rendered |
disabledoptional | readonly disabled?: boolean; | |
disabledReasonoptional | readonly disabledReason?: string; | Shown as the item tooltip when disabled. |
checkedoptional | readonly checked?: boolean; | Renders |
separatoroptional | readonly separator?: boolean; | |
itemsoptional | readonly items?: readonly DataGridMenuItem[]; | Nested submenu. |
renderoptional | readonly render?: () => ReactNode; | Custom content of the item (the item keeps its role and keyboard behavior). |
hrefoptional | readonly href?: string; | Renders the item as a link ( |
targetoptional | readonly target?: string; | Link target of an |
targetsoptional | readonly targets?: readonly DataGridContextMenuTarget['kind'][]; | Context menu only: the target kinds the item shows on (a selector). Omitted: every target. Built-in ids keep their own area (header, content, pager) and ignore it. |