showToolbar MethodStatic

Show a Toolbar at a particular location.

showToolbar(toolbarProps: ToolbarProps, location: Readonly<WritableXAndY>, offset: Readonly<WritableXAndY>, onItemExecuted: (item: any) => void, onCancel: () => void, placement: Placement"top-end", anchorElement?: HTMLElement): boolean

@returns true if the Toolbar was displayed, false if the Toolbar could not be displayed.

Parameter Type Description
toolbarProps ToolbarProps Properties of the Toolbar to display.
location Readonly<WritableXAndY> Location of the Toolbar, relative to the origin of anchorElement or the overall window.
offset Readonly<WritableXAndY> Offset of the Toolbar from the location.
onItemExecuted (item: any) => void Function invoked after a Toolbar item is executed
onCancel () => void Function invoked when the Escape key is pressed or a click occurs outside the Toolbar
placement Placement Placement relative to the given location. Defaults to top-end.
anchorElement HTMLElement The HTMLElement that anchors the Toolbar. If undefined, the location is relative to the overall window.

Returns - boolean

true if the Toolbar was displayed, false if the Toolbar could not be displayed.

Defined in

Last Updated: 21 November, 2024