showReactCard Method

Show a Card containing React-based content, a title and a toolbar at a particular location.

showReactCard(content: React.ReactNode, title: string | PropertyRecord, toolbarProps: AbstractToolbarProps, location: Readonly<WritableXAndY>, offset: Readonly<WritableXAndY>, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition?: RelativePosition, anchorElement?: HTMLElement): boolean

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

Parameter Type Description
content React.ReactNode The React node of the content to display
title string | PropertyRecord Title to display at the top of the card.
toolbarProps AbstractToolbarProps Properties of the Toolbar to display.
location Readonly<WritableXAndY> Location of the Card, relative to the origin of htmlElement or the window.
offset Readonly<WritableXAndY> Offset of the Card from the location.
onItemExecuted OnItemExecutedFunc Function invoked after a Toolbar item is executed
onCancel OnCancelFunc Function invoked when the Escape key is pressed or a click occurs outside the Card
relativePosition RelativePosition Position relative to the given location. Defaults to TopRight.
anchorElement HTMLElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.

Returns - boolean

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

Defined in

Last Updated: 17 December, 2024