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

Commit e0423ce

Browse files
devversionThomasBurleson
authored andcommitted
fix(autocomplete): fix progressbar and messages alignment and bottom padding.
- There was too much padding at the bottom (padding already done by the input container) - Progressbar was wrong aligned due wrong bottom padding (as above said) Fixes #6218 Closes #6231 Fixes #6255 Closes #6258
1 parent e0abeb4 commit e0423ce

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

src/components/autocomplete/autocomplete.scss

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
$autocomplete-option-height: 48px;
2-
$input-container-padding: 2px !default;
3-
$input-error-height: 24px !default;
42

53
@keyframes md-autocomplete-list-out {
64
0% {
@@ -51,14 +49,7 @@ md-autocomplete {
5149
height: auto;
5250

5351
md-input-container {
54-
padding-bottom: $input-container-padding + $input-error-height;
55-
56-
// When we have ng-messages, remove the input error height from our bottom padding, since the
57-
// ng-messages wrapper has a min-height of 1 error (so we don't adjust height as often; see
58-
// input.scss file)
59-
&.md-input-has-messages {
60-
padding-bottom: $input-container-padding;
61-
}
52+
padding-bottom: 0px;
6253
}
6354
md-autocomplete-wrap {
6455
height: auto;

src/components/autocomplete/demoFloatingLabel/script.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
* remote dataservice call.
2323
*/
2424
function querySearch (query) {
25-
var results = query ? self.states.filter( createFilterFor(query) ) : [];
26-
return results;
25+
var results = query ? self.states.filter( createFilterFor(query) ) : self.states;
26+
var deferred = $q.defer();
27+
$timeout(function () { deferred.resolve( results ); }, Math.random() * 1000, false);
28+
return deferred.promise;
2729
}
2830

2931
/**

0 commit comments

Comments
 (0)