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

Commit 7314e12

Browse files
author
Robert Messerle
committed
fix(autocomplete): selecting an item while loading will now hide the progress bar
Closes #3478
1 parent 288285c commit 7314e12

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/autocomplete/js/autocompleteController.js

+1
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
443443
*/
444444
function select (index) {
445445
$scope.selectedItem = ctrl.matches[index];
446+
ctrl.loading = false;
446447
ctrl.hidden = true;
447448
ctrl.index = 0;
448449
ctrl.matches = [];

src/components/autocomplete/js/autocompleteDirective.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function MdAutocomplete ($mdTheming, $mdUtil) {
136136
role="listbox">\
137137
' + getInputElement() + '\
138138
<md-progress-linear\
139-
ng-if="$mdAutocompleteCtrl.loading"\
139+
ng-if="$mdAutocompleteCtrl.loading && !$mdAutocompleteCtrl.hidden"\
140140
md-mode="indeterminate"></md-progress-linear>\
141141
<ul role="presentation"\
142142
class="md-autocomplete-suggestions md-whiteframe-z1 {{menuClass || \'\'}}"\

0 commit comments

Comments
 (0)