I am trying to pass in a value to a dom-repeat
template, but the behavior defaults to the first item in the array. I am trying to set a string from an array of strings.
Parent Component
<select value="[[entry.method]]"
on-change="_changeMethod">
<template is="dom-repeat" items="[[entry.methods]]">
<option value="[[item]]">[[item]]</option>
</template>
</select>
Child Component
this.dispatchEvent(new CustomEvent('add-item', {
bubbles: true,
composed: true,
detail: {
method: 'b',
methods: ['a', 'b', 'c']
}));
The drop down defaults to 'a'
How can I pass in 'b'
to set the initial drop down value?