AboutSupportDeveloper GuideVersion 20.1.5

Type alias SplitButtonFragment

SplitButtonFragment: ContainerTemplateFragment<"SplitButton"> & {
    buttonStyle: SplitButtonStyle;
    dataKey: string;
}

Type declaration

  • buttonStyle: SplitButtonStyle

    Determines the styling of the split button.

  • dataKey: string

    Data key of the template fragment.

    The data associated with this fragment will be looked up in templateData map with this key.

    Example:

    const myTemplateLayout = {
    type: FragmentTypes.SplitButton,
    buttonStyle: ButtonStyle.Primary,
    dataKey: 'splitButton1',
    }

    const searchResult: CLISearchResultCustom = {
    //...
    template: CLITemplate.Custom,
    templateContent: {
    layout: myTemplateLayout,
    data: {
    splitButton1: {
    label: 'Split Button 1',
    tooltip: 'Click me',
    icon: 'iconURL',
    action: 'primaryAction',
    options: [
    {
    label: 'Menu Option 1',
    tooltip: 'Click for optionAction1',
    action: 'optionAction1'
    },
    {
    label: 'Menu Option 2',
    tooltip: 'Click for optionAction2',
    action: 'optionAction1'
    }
    ]
    }
    }
    };