Last date modified: 2025-Jul-02

Interface: IToolbar

A dynamic toolbar that may contain multiple IToolbarControl types at runtime to generate toolbar actions

Properties

allControls

readonlyallControls: IToolbarControl[]

Array of all IToolbarControls from all slots in the toolbar


centerControls

readonlycenterControls: IToolbarControl[]

Array of IToolbarControls for the center of the toolbar


class

class: string

Class to bind to for the css style


controlsHidden

readonlycontrolsHidden: boolean

Whether or not IToolbarControls are hidden


id

id: string

The element id for the toolbar


leftControls

readonlyleftControls: IToolbarControl[]

Array of IToolbarControls for the left side of the toolbar


overflow

readonlyoverflow: IToolbarOverflow

A flexible container for IToolbarControls that overflow the main toolbar


permissionCheck?

optionalpermissionCheck: IPermissionCheckRequest

permission checklist for the toolbar


rightControls

readonlyrightControls: IToolbarControl[]

Array of IToolbarControls for the right of the toolbar


title

title: string

The title of the toolbar element, used for toolTip text

Methods

addControl()

addControl(control, alignment, order?): void

Adds the provided toolbar control to the toolbar

Parameters

control: IToolbarControl

The toolbar control to add to the toolbar

alignment: ToolbarControlAlignment

The side of the toolbar to add the control to; left, center or right

order?: number

The 0 based position to insert the control at in the toolbar, inserted at the end if not passed

Returns

void


createToolbarControl()

createToolbarControl(config, alignment, order?): Promise<IToolbarControl>

Creates a toolbar control and add it to the toolbar

Parameters

config: IToolbarControlConfig

The toolbar configuration

alignment: ToolbarControlAlignment

The side of the toolbar to add the control to; left, center or right

order?: number

The 0 based position to insert the control at in the toolbar, inserted at the end if not passed

Returns

Promise<IToolbarControl>

A new toolbar control if successful, undefined if an error occurred


disableAllControls()

disableAllControls(): Promise<void>

Disables all toolbar controls added in the toolbar. This method invokes disable public method on all of individual controls contained in the toolbar. Depending on the implementation of the disable method, a control may be not be disabled as result.

Returns

Promise<void>

Promise that resolves when all toolbar controls are disabled


enableAllControls()

enableAllControls(): Promise<void>

Enables all toolbar controls added in the toolbar. This method invokes enable public method on all of individual controls contained in the toolbar. Depending on the implementation of the enable method, a control may be not be enabled as result.

Returns

Promise<void>

Promise that resolves when all toolbar controls are enabled


getControlById()

getControlById(id): IToolbarControl

Retrieves the toolbar control with the specified identifier

Parameters

id: string

The element identifier

Returns

IToolbarControl

First toolbar control element matching $ or null if none present


hideAllControls()

hideAllControls(): void

Hides all controls in the toolbar

Returns

void


removeControl()

removeControl(control): boolean

Removes the provided toolbar control from the toolbar

Parameters

control: IToolbarControl

The toolbar control to remove from the toolbar

Returns

boolean

Whether or not item was removed


removeControlById()

removeControlById(controlId): boolean

Removes a toolbar control from the toolbar with the provided control ID

Parameters

controlId: string

The toolbar control to remove from the toolbar

Returns

boolean

Whether or not item was removed


showAllControls()

showAllControls(): void

Shows all controls in the toolbar

Returns

void


toggleList()

toggleList(updateVal?): void

Sets toolbar overflow toggle to an explicit state. Toggles state if none provided.

Parameters

updateVal?: boolean

State to set toggle; active if true

Returns

void

Return to top of the page
Feedback