Skip to content

Commit

Permalink
fix(autocomplete): fix progressbar and messages alignment and bottom …
Browse files Browse the repository at this point in the history
…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 angular#6218 Closes #angular#6231 Fixes angular#6255
  • Loading branch information
devversion committed Dec 11, 2015
1 parent 195dbb4 commit d4c91ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
11 changes: 1 addition & 10 deletions src/components/autocomplete/autocomplete.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
$autocomplete-option-height: 48px;
$input-container-padding: 2px !default;
$input-error-height: 24px !default;

@keyframes md-autocomplete-list-out {
0% {
Expand Down Expand Up @@ -51,14 +49,7 @@ md-autocomplete {
height: auto;

md-input-container {
padding-bottom: $input-container-padding + $input-error-height;

// When we have ng-messages, remove the input error height from our bottom padding, since the
// ng-messages wrapper has a min-height of 1 error (so we don't adjust height as often; see
// input.scss file)
&.md-input-has-messages {
padding-bottom: $input-container-padding;
}
padding-bottom: 0px;
}
md-autocomplete-wrap {
height: auto;
Expand Down
6 changes: 4 additions & 2 deletions src/components/autocomplete/demoFloatingLabel/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
* remote dataservice call.
*/
function querySearch (query) {
var results = query ? self.states.filter( createFilterFor(query) ) : [];
return results;
var results = query ? self.states.filter( createFilterFor(query) ) : self.states;
var deferred = $q.defer();
$timeout(function () { deferred.resolve( results ); }, Math.random() * 1000, false);
return deferred.promise;
}

/**
Expand Down

0 comments on commit d4c91ff

Please sign in to comment.