Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 8584692

Browse files
author
Robert Messerle
committed
fix(autocomplete): addresses issue where dropdown shows if there is an initial value
Closes #2517
1 parent 2fef6ca commit 8584692

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/autocomplete/js/autocompleteController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
190190

191191
function handleSearchText (searchText, previousSearchText) {
192192
self.index = getDefaultIndex();
193-
//-- do nothing on init if there is no initial value
194-
if (!searchText && searchText === previousSearchText) return;
193+
//-- do nothing on init
194+
if (searchText === previousSearchText) return;
195195
//-- clear selected item if search text no longer matches it
196196
if (searchText !== getDisplayValue($scope.selectedItem)) $scope.selectedItem = null;
197197
else return;

0 commit comments

Comments
 (0)