Skip to content

Commit c71a166

Browse files
committed
Merge branch 'patch-9' of https://github.com/dciborow/azure-docs into ds-dc-update-common-dropdown
2 parents f8af7ab + d5af05e commit c71a166

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Loading

articles/azure-resource-manager/managed-applications/microsoft-common-dropdown.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,44 @@ When filtering is enabled, the control includes a text box for adding the filter
9090
- The `defaultDescription` property is used for items that don't have a description.
9191
- The `placeholder` property is help text that disappears when the user begins editing. If the `placeholder` and `defaultValue` are both defined, the `defaultValue` takes precedence and is shown.
9292

93+
## Example
94+
In the following example, the `defaultValue` is defined using the values of the `allowedValues` instead of the labels. The default value can contain multipule values when `multiselect` is enabled.
95+
96+
:::image type="content" source="./media/managed-application-elements/microsoft-common-dropdown-6.png" alt-text="Screenshot that shows how multiuple default values can be included with multi-select enabled":::
97+
98+
```json
99+
{
100+
"name": "element1",
101+
"type": "Microsoft.Common.DropDown",
102+
"label": "Example drop down",
103+
"placeholder": "",
104+
"defaultValue": [{"value": "one"}, {"value": "two"}],
105+
"toolTip": "Multipule values can be selected",
106+
"multiselect": true,
107+
"selectAll": true,
108+
"filter": true,
109+
"filterPlaceholder": "Filter items ...",
110+
"multiLine": true,
111+
"defaultDescription": "A value for selection",
112+
"constraints": {
113+
"allowedValues": [
114+
{
115+
"label": "Value one",
116+
"description": "The value to select for option 1.",
117+
"value": "one"
118+
},
119+
{
120+
"label": "Value two",
121+
"description": "The value to select for option 2.",
122+
"value": "two"
123+
}
124+
],
125+
"required": true
126+
},
127+
"visible": true
128+
}
129+
```
130+
93131
## Next steps
94132

95133
* For an introduction to creating UI definitions, see [Getting started with CreateUiDefinition](create-uidefinition-overview.md).

0 commit comments

Comments
 (0)