Skip to content

Commit f3108a0

Browse files
authored
Merge pull request #476 from cal-smith/issue#276
fix(dropdown-list): selected emitting on init when nothing is selected
2 parents f741f09 + 1dd8370 commit f3108a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/dropdown/list/dropdown-list.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ export class DropdownList implements AbstractDropdownView, AfterViewInit, OnDest
212212
this.index = this._items.findIndex(item => item.selected);
213213
this.setupFocusObservable();
214214
setTimeout(() => {
215+
if (!this.getSelected()) { return; }
215216
if (this.type === "single") {
216217
this.select.emit({ item: this._items.find(item => item.selected) });
217218
} else {

0 commit comments

Comments
 (0)