+ {templates.map(({id, values, tempVar}) => {
+ const items = values.map(value => ({...value, text: value.value}))
+ const selectedItem = items.find(item => item.selected) || items[0]
+ const selectedText = selectedItem && selectedItem.text
- // TODO: change Dropdown to a MultiSelectDropdown, `selected` to
- // the full array, and [item] to all `selected` values when we update
- // this component to support multiple values
- return (
+ // TODO: change Dropdown to a MultiSelectDropdown, `selected` to
+ // the full array, and [item] to all `selected` values when we update
+ // this component to support multiple values
+ return (
+