dropdownConfig

Examples

kind: Dropdown
label: My Label
choices:
  - label: Option A
    value: a
  - label: Option B
    value: b
value: a # OPTIONAL
placeholder: Select your option # OPTIONAL
disableWhen: # OPTIONAL
  kind: Equal
  control: my-other-control1
  value: 1f
hideWhen: # OPTIONAL
  kind: Falsy
  control: my-other-control2
updateChoicesWhen: # OPTIONAL
  kind: Match
  control: my-other-control3
  matchValues:
    - value: true
      choices:
        - label: Option C
          value: c
        - label: Option D
          value: d
    - value: false
      choices:
        - label: Option E
          value: e
        - label: Option F
          value: f

Object properties

Name Type Required
kind Constant: Dropdown yes
label string yes
choices Array yes
value One of no
placeholder string no
disableWhen One of no
hideWhen One of no
updateChoicesWhen Object: updateChoicesWhen no

Object information

  • Object with the following properties:
    • kind (required): Constant Dropdown
      • Dropdown is used to select one option from multiple choices
    • label (required): string
      • The label of the dropdown
    • choices (required):
      • The choices of the dropdown
      • Array of:
        • Object with the following properties:
          • label (required): string
          • value (required): One of the following types:
            • boolean
            • string
            • number
    • value (optional):
      • Optionally define the value of the dropdown
      • One of the following types:
        • boolean
        • string
        • number
    • placeholder (optional): string
      • Optionally display a placeholder when the value is empty
    • disableWhen (optional):
    • hideWhen (optional):
    • updateChoicesWhen (optional): Object updateChoicesWhen