Interface ChoiceConfigs<Custom>

interface ChoiceConfigs<Custom> {
    custom?: Custom;
    defaultDisabled?: boolean;
    disabledOnSelected?: ItemAbledOnSelected;
    enabledOnSelected?: ItemAbledOnSelected;
    id?: string;
    onSelected?: ChoiceOnSelected;
    value?: any;
}

Type Parameters

  • Custom = any

Hierarchy

  • ItemConfigs<Custom>
    • ChoiceConfigs

Properties

custom?: Custom

Any values that help you determine on how to render the frontend UI or how to perform validation.

defaultDisabled?: boolean

Whether or not this item is disabled by default.

disabledOnSelected?: ItemAbledOnSelected

A list of choice id.

This item will be disabled if the requirement is fulfilled.

enabledOnSelected?: ItemAbledOnSelected

A list of choice id.

This item will be enabled if the requirement is fulfilled.

id?: string

Item id.

It should be unique throughout the entire form.

It will be auto generated if you leave it falsy.

onSelected?: ChoiceOnSelected

use enabledOnSelected and disabledOnSelected on the target items instead.

Actions to be performed when this choice is toggled.

value?: any

Value of this choice. It will be used as answer of the question.

Using primitive type like string or number is recommended due to the limitation in comparing complex value.

Id will be used as value if you leave it undefined.