View as Markdown

API reference: @salmonui/data-grid

DataGridToolbarIteminterface

import type { DataGridToolbarItem } from '@salmonui/data-grid';
interface DataGridToolbarItem {
    readonly id: string;
    readonly label?: string;
    readonly icon?: ReactNode;
    readonly title?: string;
    readonly align?: 'start' | 'center' | 'end';
    readonly disabled?: boolean;
    readonly render?: (ctx: {
        readonly disabled: boolean;
    }) => ReactNode;
}

A toolbar item. An object whose id is a built-in id keeps the built-in behavior (use it to change the label, icon, or alignment of a built-in). disabled is reactive.

DataGridToolbarItem members (7)
NameSignatureDescription
idreadonly id: string;
labeloptionalreadonly label?: string;

Button text; for a render item its accessible name and overflow menu text (development builds warn when a render item has neither label nor title).

iconoptionalreadonly icon?: ReactNode;
titleoptionalreadonly title?: string;

Tooltip (title).

alignoptionalreadonly align?: 'start' | 'center' | 'end';
disabledoptionalreadonly disabled?: boolean;
renderoptionalreadonly render?: (ctx: { readonly disabled: boolean; }) => ReactNode;

Custom content; the item keeps its roving tab stop.