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

Commit 85785e4

Browse files
crisbetoThomasBurleson
authored andcommitted
fix(select): remove some unnecessary logic
Since PR #8651 the shadow `select` element isn't using ngModel anymore, which makes this logic redundant. It also spares us an extra digest being caused by nextTick. Closes #8735
1 parent 39911d3 commit 85785e4

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/components/select/select.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -268,16 +268,6 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $compile, $par
268268
findSelectContainer();
269269
$mdTheming(element);
270270

271-
if (attr.name && formCtrl) {
272-
var selectEl = element.parent()[0].querySelector('select[name=".' + attr.name + '"]');
273-
$mdUtil.nextTick(function() {
274-
var controller = angular.element(selectEl).controller('ngModel');
275-
if (controller) {
276-
formCtrl.$removeControl(controller);
277-
}
278-
});
279-
}
280-
281271
if (formCtrl && angular.isDefined(attr.multiple)) {
282272
$mdUtil.nextTick(function() {
283273
var hasModelValue = ngModelCtrl.$modelValue || ngModelCtrl.$viewValue;

0 commit comments

Comments
 (0)