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

Commit

Permalink
fix(select): mdInputContainer not realizing select had value
Browse files Browse the repository at this point in the history
  • Loading branch information
rschmukler committed Jun 28, 2015
1 parent cbbb4b9 commit 1a8acd0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/components/select/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,11 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $interpolate,
}


ngModelCtrl.$parsers.push(ngModelPipelineCheckValue);
ngModelCtrl.$formatters.push(ngModelPipelineCheckValue);

var originalRender = ngModelCtrl.$render;
ngModelCtrl.$render = function() {
originalRender();
syncLabelText();
inputCheckValue();
};

mdSelectCtrl.setLabelText = function(text) {
Expand Down Expand Up @@ -318,11 +316,6 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $interpolate,
}
});

function ngModelPipelineCheckValue(arg) {
containerCtrl && containerCtrl.setHasValue(!ngModelCtrl.$isEmpty(arg));
return arg;
}

function inputCheckValue() {
// The select counts as having a value if one or more options are selected,
// or if the input's validity state says it has bad input (eg string in a number input)
Expand Down

0 comments on commit 1a8acd0

Please sign in to comment.