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

Commit

Permalink
fix(select): fix md-select with no placeholder outside of
Browse files Browse the repository at this point in the history
md-input-container

closes #3483
  • Loading branch information
rschmukler committed Jun 28, 2015
1 parent 9a045fb commit 4be344b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/select/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $interpolate,
mdSelectCtrl.setLabelText = function(text) {
mdSelectCtrl.setIsPlaceholder(!text);
// Use placeholder attribute, otherwise fallback to the md-input-container label
var tmpPlaceholder = attr.placeholder || (containerCtrl.label ? containerCtrl.label.text() : '');
var tmpPlaceholder = attr.placeholder || (containerCtrl && containerCtrl.label ? containerCtrl.label.text() : '');
text = text || tmpPlaceholder || '';
var target = valueEl.children().eq(0);
target.text(text);
Expand Down Expand Up @@ -372,7 +372,7 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $interpolate,
element: selectContainer,
target: element[0],
hasBackdrop: true,
loadingAsync: attr.mdOnOpen ? scope.$eval(attr.mdOnOpen) || true : false,
loadingAsync: attr.mdOnOpen ? scope.$eval(attr.mdOnOpen) || true : false
}).then(function(selectedText) {
isOpen = false;
});
Expand Down

0 comments on commit 4be344b

Please sign in to comment.