Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/components/select/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ angular.module('material.components.select', [
* </hljs>
*
* At first one might expect that the select should be populated with "Bob" as the selected user. However,
* this is not true. To determine whether something is selected,
* this is not true. To determine whether something is selected,
* `ngModelController` is looking at whether `$scope.selectedUser == (any user in $scope.users);`;
*
*
* Javascript's `==` operator does not check for deep equality (ie. that all properties
* on the object are the same), but instead whether the objects are *the same object in memory*.
* In this case, we have two instances of identical objects, but they exist in memory as unique
Expand All @@ -98,7 +98,7 @@ angular.module('material.components.select', [
* To get around this, `ngModelController` provides a `track by` option that allows us to specify a different
* expression which will be used for the equality operator. As such, we can update our `html` to
* make use of this by specifying the `ng-model-options="{trackBy: '$value.id'}"` on the `md-select`
* element. This converts our equality expression to be
* element. This converts our equality expression to be
* `$scope.selectedUser.id == (any id in $scope.users.map(function(u) { return u.id; }));`
* which results in Bob being selected as desired.
*
Expand Down Expand Up @@ -144,7 +144,7 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $compile, $par
.find('md-content')
.prepend(angular.element(
'<div>' +
' <md-progress-circular md-mode="{{progressMode}}" ng-hide="$$loadingAsyncDone"></md-progress-circular>' +
' <md-progress-circular md-mode="{{progressMode}}" ng-hide="$$loadingAsyncDone" md-diameter="25px"></md-progress-circular>' +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't that be md-diameter="25"?
I know it will still work with the px suffix because the float will be parsed and ignores the text.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted it to be as obvious as possible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

'</div>'
));

Expand Down Expand Up @@ -286,7 +286,7 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $compile, $par
}
});

// Wait until postDigest so that we attach after ngModel's
// Wait until postDigest so that we attach after ngModel's
// blur listener so we can set untouched.
$mdUtil.nextTick(function () {
element.on('blur', function() {
Expand Down