Skip to content

Commit

Permalink
Merge a003c0b into 071916d
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo committed Jun 27, 2018
2 parents 071916d + a003c0b commit 4d7ee8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/vaadin-dropdown-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@

this._attachSelectedItem(selected);

if (!this._valueChanging) {
if (!this._valueChanging && selected) {
this._selectedChanging = true;
this.value = selected && selected.value || '';
this.value = selected.value || '';
delete this._selectedChanging;
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/dropdown-menu-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,10 @@
expect(menu.selected).to.be.equal(1);
});

it('Should select first item with empty value when when value is not found in items', () => {
it('Should not select any item when value is not found in items', () => {
dropdown.value = 'v2';
dropdown.value = 'foo';
expect(menu.selected).to.be.equal(0);
expect(menu.selected).to.be.undefined;
});

describe('has-value attribute on text-field', () => {
Expand Down

0 comments on commit 4d7ee8d

Please sign in to comment.