Dialogs
A Dialog is a small temporary window of options presented to the user.
The @bentley/ui-framework
and @bentley/ui-core
packages contain several classes and components for displaying modal and modeless dialogs.
- ModalDialogManager - displays and manages multiple modal dialogs
- ModelessDialogManager - displays and manages multiple modeless dialogs
- ModelessDialog - Modeless Dialog React component uses the Dialog component with a modal={false} prop. It controls the z-index to keep the focused dialog above others.
- Dialog - Dialog React component with optional resizing and moving functionality. Supports modal and modeless dialogs and supports a button cluster in the lower-right.
Sample Modal Dialog
The following sample shows a modal dialog with OK/Cancel buttons.
SampleModalDialog React component
This sample React component uses the Dialog component and sets up the buttons and necessary handlers to close the dialog properly.
Opening a Modal Dialog
The ModalDialogManager.openDialog
function is called to open a modal dialog.
Handling Modal Dialog Close
The ModalDialogManager.closeDialog
function is called to close a modal dialog.
Sample Modeless Dialog
This sample React component uses the ModelessDialog component and sets up the necessary handlers to close the dialog properly.
Opening a Modeless Dialog
The ModelessDialogManager.openDialog
function is called to open a modeless dialog.
Handling Modeless Dialog Close
The ModelessDialogManager.closeDialog
function is called to close a modeless dialog.
API Reference
Last Updated: 11 June, 2024