The correct value shows in the field but when clicking the dropdown, the first item is highlighted.

<PowerSelect
@renderInPlace={{true}}
@selected={{this.destination}}
@onChange={{this.select}}
@options={{@states}} as |state|
>
{{state.name}}
</PowerSelect>
export default class PropertiesPropertyEditAddressComponent extends Component {
@tracked destination = null;
constructor() {
super(...arguments);
this.destination = this.args.property.address.state;
}
@action
select(value) {
this.destination = value;
set(this.args.property.address, "state", value);
}
}
@states is an array of state objects…such as { name: 'Alaska', abbreviation: 'AK' }.
3 posts - 2 participants