Represents an action trigger that determines when an action can be triggered.

interface IActionTrigger<Data extends any = IAnything> {
    action?: string;
    divider?: boolean;
    icon?: any;
    isAvailable?: boolean | (payload: Data) => boolean | Promise<boolean>;
    label?: string;
    primary?: number | boolean;
}

Type Parameters

  • Data extends any = IAnything

    The type of data that the trigger function will receive.

Hierarchy

  • Omit<IOption, keyof { isDisabled: never; isVisible: never }>
    • IActionTrigger

Properties

action?: string
divider?: boolean
icon?: any
isAvailable?: boolean | (payload: Data) => boolean | Promise<boolean>
label?: string
primary?: number | boolean