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

Commit

Permalink
fix(autocomplete): should now properly support ng-disabled
Browse files Browse the repository at this point in the history
Closes #4999
  • Loading branch information
Robert Messerle committed Nov 18, 2015
1 parent 9d52697 commit 2ab1d2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/autocomplete/js/autocompleteController.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
*/
function configureWatchers () {
var wait = parseInt($scope.delay, 10) || 0;
$attrs.$observe('disabled', function (value) { ctrl.isDisabled = value; });
$attrs.$observe('required', function (value) { ctrl.isRequired = value !== null; });
$attrs.$observe('disabled', function (value) { ctrl.isDisabled = !!value; });
$attrs.$observe('required', function (value) { ctrl.isRequired = !!value; });
$scope.$watch('searchText', wait ? $mdUtil.debounce(handleSearchText, wait) : handleSearchText);
$scope.$watch('selectedItem', selectedItemChange);
angular.element($window).on('resize', positionDropdown);
Expand Down

0 comments on commit 2ab1d2d

Please sign in to comment.