Skip to content

Dropdown

dropdown

Description

Displays a dropdown control with the choices configured.

Attributes

  • default
  • $data key/value pairs
  • enum flat list of values
  • $display.as: "text" | "capitalize"
  • $capture.rule: display the field based specified rule * setting: * text: condition to match

Example

{
  "type": "string",
  "$capture": {
    "as": "dropdown",
    "rule": {
      "setting": "rule",
      "text": "values.roa is 'Inhalation'"
    }
  },
  "$display": {
    "as": "capitalize"
  },
  "title": "Test dropdown",
  "$data": {
    "source": [
      {
        "display": "value1",
        "value": "value2",
        "icon": "fal fa-frown-open",
        "color": "red",
        "tableData": {
          "id": 0
        }
      },
      {
        "display": "value2",
        "value": "value2",
        "tableData": {
          "id": 1
        }
      }
    ]
  }
}