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

Commit

Permalink
fix(autocomplete): selecting an item while loading will now hide the …
Browse files Browse the repository at this point in the history
…progress bar

Closes #3478
  • Loading branch information
Robert Messerle committed Jun 29, 2015
1 parent 288285c commit 7314e12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/autocomplete/js/autocompleteController.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
*/
function select (index) {
$scope.selectedItem = ctrl.matches[index];
ctrl.loading = false;
ctrl.hidden = true;
ctrl.index = 0;
ctrl.matches = [];
Expand Down
2 changes: 1 addition & 1 deletion src/components/autocomplete/js/autocompleteDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function MdAutocomplete ($mdTheming, $mdUtil) {
role="listbox">\
' + getInputElement() + '\
<md-progress-linear\
ng-if="$mdAutocompleteCtrl.loading"\
ng-if="$mdAutocompleteCtrl.loading && !$mdAutocompleteCtrl.hidden"\
md-mode="indeterminate"></md-progress-linear>\
<ul role="presentation"\
class="md-autocomplete-suggestions md-whiteframe-z1 {{menuClass || \'\'}}"\
Expand Down

1 comment on commit 7314e12

@vitorlopez
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this commit also closes #3162

Please sign in to comment.