SheetXL - v0.3.20
    Preparing search index...

    Interface OptionsNotificationOptions

    Configuration for an options dialog.

    interface OptionsNotificationOptions {
        cancelOption?: string;
        createOptionsButton?: (
            option: string,
            props: HTMLAttributes<HTMLButtonElement> & Attributes,
            isDefaultOption: boolean,
        ) => ReactNode;
        defaultOption?: string;
        description?: string;
        icon?: ReactNode;
        onOption?: (option: string, isCancel: boolean, isDefault: boolean) => void;
        onValidateOption?: (option?: string) => boolean | Promise<boolean>;
        options?: string[];
        title?: string;
    }

    Hierarchy

    • HTMLAttributes<HTMLDivElement>
      • OptionsNotificationOptions
    Index

    Properties

    cancelOption?: string

    Allows for the cancel option to be specified. Allow for special styling.

    'Cancel'
    
    createOptionsButton?: (
        option: string,
        props: HTMLAttributes<HTMLButtonElement> & Attributes,
        isDefaultOption: boolean,
    ) => ReactNode

    Hook for create custom options buttons

    The option is passed as the children prop and as the second argument

    defaultOption?: string

    Allows for the option will be the default selected option and the enter key trigger.

    The first option
    
    description?: string

    Display text information for the user to make a decision.

    icon?: ReactNode

    Display an icon next to the description for additional context

    Not yet implemented

    onOption?: (option: string, isCancel: boolean, isDefault: boolean) => void

    Call when an option is selected.

    It is possible that the option can be both a cancel and a default option.

    onValidateOption?: (option?: string) => boolean | Promise<boolean>

    Call when an option is selected. If false is returned, the the dialog will not close. Notification is not provided but can be supplied via the textFieldProps helperText property.

    options?: string[]

    The options as a list of strings

    title?: string

    The title of the options panel