Dropdown
Dropdowns are used for data lists.
You can make selections from predefined list items using the option
field, or use the dataset
field to make selections among specific array properties of catalog entities. For more detailed information about the dataset
field, you can visit the catalog dynamic fields page.
For multi-selection support, you can use the multiple-dropdown
input type instead of a regular dropdown
.
Dropdown input example
[
{
"type": "dropdown",
"title": "Dropdown input title",
"payloadName": "dropdown_input",
"defaultValue": "option_1",
"helpText": "Dropdown input help text",
"options": [
{
"label": "Dropdown option label 1",
"value": "option_1"
},
{
"label": "Dropdown option label 2",
"value": "option_2"
}
]
},
{
"type": "multiple-dropdown",
"title": "Multiple dropdown input title",
"payloadName": "multiple_dropdown_input",
"defaultValue": ["option_1"],
"helpText": "Multiple dropdown input help text",
"options": [
{
"label": "Multiple dropdown option label 1",
"value": "option_1"
},
{
"label": "Multiple dropdown option label 2",
"value": "option_2"
}
]
}
]
[
{
"type": "checkbox",
"title": "This example changes supported fields in the child inputs",
"payloadName": "parent"
},
{
"type": "dropdown",
"title": "Child input title",
"payloadName": "child",
"defaultValue": "option_1",
"helpText": "Child input help text",
"options": [
{
"label": "Child option label 1",
"value": "option_1"
},
{
"label": "Child option label 2",
"value": "option_2"
}
],
"condition": {
"when": "parent",
"is": "true",
"then": {
"title": "New title",
"helpText": "New helpText",
"defaultValue": "alternate_option_1",
"options":[
{
"label": "Alternate option label 1",
"value": "alternate_option_1"
},
{
"label": "Alternate option label 2",
"value": "alternate_option_2"
}
]
}
}
},
{
"type": "multiple-dropdown",
"title": "Multiple child input title",
"payloadName": "multiple_child",
"defaultValue": ["option_1"],
"helpText": "Child input help text",
"options": [
{
"label": "Multiple child option label 1",
"value": "option_1"
},
{
"label": "Multiple child option label 2",
"value": "option_2"
}
],
"condition": {
"when": "parent",
"is": "true",
"then": {
"title": "New title",
"helpText": "New helpText",
"defaultValue": ["alternate_option_1"],
"options":[
{
"label": "Alternate option label 1",
"value": "alternate_option_1"
},
{
"label": "Alternate option label 2",
"value": "alternate_option_2"
}
]
}
}
}
]
Last updated