Skip to content

Commit

Permalink
Merge e5472ef into 8427e9c
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-fix committed Nov 5, 2020
2 parents 8427e9c + e5472ef commit 6397005
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vaadin-combo-box-mixin.html
Expand Up @@ -947,7 +947,7 @@
return this._getItemLabel(item).toString().toLowerCase().indexOf(filter) > -1;
});

return !filteredItems.length && this.autoOpenDisabled ? arr : filteredItems;
return filteredItems;
}

/** @private */
Expand Down
11 changes: 11 additions & 0 deletions test/filtering.html
Expand Up @@ -66,6 +66,17 @@
expect(comboBox.opened).to.equal(false);
});

it('should filter items when filter is changed regardless of autoOpenDisabled', () => {
comboBox.autoOpenDisabled = true;
comboBox.close();

comboBox.value = 'foo';
comboBox.open();
setInputValue('foo ');

expect(getFilteredItems()).to.be.empty;
});

it('should open the popup when the value of the input field is set to none', () => {
comboBox.value = 'foo';
comboBox.close();
Expand Down

0 comments on commit 6397005

Please sign in to comment.