Search Results for

    Show / Hide Table of Contents

    DialogOptions

    Specifies options for opening dialog windows. Also see DialogContext

    
    interface DialogOptions extends BaseDialogOptions {
        /** When timeout is set, the dialog will automatically close after the specified number of milliseconds. Default: null */
        timeout?: number;
        /** The window that will host the dialog */
        parentWindow?: any;
        /** Callback after the dialog has opened asynchronously. */
        onOpen?: DialogContextCallback | null;
        /** Callback made when the dialog is closed. */
        onClose?: DialogContextCallback | null;
        /** Label of the button that will be focused by default. */
        defaultButton?: string | null;
        /** Object to focus when the dialog is closed. */
        focusOnClose?: IFocus;
        /** One or more web resource names to load as CSS files inside the dialog's frame. */
        contentCss?: string | ReadonlyArray<string> | null;
    }
    
    interface BaseDialogOptions {
        /** Html content to display in the dialog. Use the `text` property instead if your dialog uses plain text content.
        * If it is html, make sure to encode any values the user has entered using Hsl.HtmlEncode */
        contentHtml?: string | null;
        /** Text to display in the dialog. Use content if you need to display html */
        text?: string | null;
        /** Title to display for the dialog */
        title?: string | null;
        /** Subtitle to display below the title of the dialog. */
        subtitle?: string | null;
    
        /** Progress from 0 to 1 */
        progress?: number | null;
        /** Progress from 0 to 100 */
        progressPercent?: number | null;
    
        /** The width of the dialog. */
        width?: string | number | null;
        /** The maximum width of the dialog content. */
        minWidth?: string | number | null;
        /** The maximum width of the dialog content. */
        maxWidth?: string | number | null;
    
        /** The height of the opened dialog */
        height?: string | number | null;
        /** The maximum height of the dialog. */
        maxHeight?: string | number | null;
        /** The minimum height of the dialog. */
        minHeight?: string | number | null;
    
        /** Whether the 'x' to close the dialog is shown. */
        hideClose?: boolean | null;
    
        /** Buttons to display at the bottom of the dialog. */
        buttons?: ReadonlyArray<DialogButton> | Dictionary<DialogContextCallback> | null;
    
        /** Whether text selection is enabled in the dialog. Default: false */
        textSelectionEnabled?: boolean;
    
        /** The z index the dialog is rendered at. Default: 1005 */
        zIndex?: number;
    }
    
    
    interface DialogButton {
        /** Label to display on the button. */
        label: string;
        /** An action callback to occur when the button is clicked. */
        action: DialogContextCallback;
        /** The minimum width of the button */
        width?: any;
        /** Whether this button should be focused by default when the dialog is opened. */
        default?: boolean;
    }
    
    interface UpdateDialogOptions extends BaseDialogOptions {
        /** A callback made after the update is performed. */
        afterUpdate?: DialogContextCallback;
    }
    
    type DialogContextCallback = (ctx: DialogContext) => void;
    
    
    In This Article
    Back to top Hitachi Solutions JS Library