sdk.choice
Home > @matterway/sdk > Choice
Choice namespace
Functions
Function | Description |
---|---|
showChoice(ctx, options) | Renders a form dialog with one or more sets of obligatory single choices. It displays a bubble with a text, one or more groups of radio buttons, header and navigation buttons, and waits until the user clicks one of the buttons. Common uses for this dialog are: - Asking how to proceed after an unexpected condition; - Asking whether to perform or skip a next step; - Asking for a decision to disambiguate a result. The All the choice groups in the form are required, and the main action will only be enabled when every choice has a value. One or more buttons can be specified, of which the "main" action should be the last. By default, the dialog presents a single Resolves when the user clicks one of the buttons, with the |
showMultipleChoice(ctx, options) | Renders a form dialog with one or more sets of multiple optional choices. It displays a bubble with a text, one or more groups of checkboxes, header and navigation buttons, and waits until the user clicks one of the buttons. Common uses for this dialog are: - Asking which optional tasks should be done next; - Asking which products should be removed from an order; - Asking which cost centers should be assigned to an invoice. The Any number of buttons can be specified, of which the "main" action should be the last. By default, the dialog presents a single Resolves when the user clicks one of the buttons, with the |
Variables
Variable | Description |
---|---|
DEFAULT_SHOW_CHOICE_OPTIONS | |
DEFAULT_SHOW_MULTIPLE_CHOICE_OPTIONS |