Skip to main content

ActionBarItem

ActionBarItem

A button in the ActionBar area at the top of one of the list or detail views.

Signature
interface ActionBarItem {
id: string;
label: string;
locationId: ActionBarLocationId;
disabled?: Observable<boolean>;
buttonState?: (context: ActionBarContext) => Observable<ActionBarButtonState>;
onClick?: (event: MouseEvent, context: ActionBarContext) => void;
routerLink?: RouterLinkDefinition;
buttonColor?: 'primary' | 'success' | 'warning';
buttonStyle?: 'solid' | 'outline' | 'link';
icon?: string;
requiresPermission?: string | string[];
}

id

property
string

label

property
string

locationId

disabled

property
Observable<boolean>

Deprecated since v2.1.0 - use buttonState instead.

buttonState

property
v2.1.0
(context: ActionBarContext) => Observable<ActionBarButtonState>

A function which returns an observable of the button state, allowing you to dynamically enable/disable or show/hide the button.

onClick

property
(event: MouseEvent, context: ActionBarContext) => void

buttonColor

property
'primary' | 'success' | 'warning'

buttonStyle

property
'solid' | 'outline' | 'link'

icon

property
string

requiresPermission

property
string | string[]