Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/pkg/angular/lib/directive/input_select.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/lib/directive/input_select.dart
diff --git a/third_party/pkg/angular/lib/directive/input_select.dart b/third_party/pkg/angular/lib/directive/input_select.dart
index 7222bf34aa1807627082de07790d8f242be312d6..3c5aaf3e32ac016e6360889c0be77e5fd1ede90c 100644
--- a/third_party/pkg/angular/lib/directive/input_select.dart
+++ b/third_party/pkg/angular/lib/directive/input_select.dart
@@ -62,7 +62,7 @@ class InputSelectDirective implements NgAttachAware {
}
/**
- * This method invalidates the current state of the selector and forces a rerendering of the
+ * This method invalidates the current state of the selector and forces a re-rendering of the
* options using the [Scope.$evalAsync].
*/
dirty() {
@@ -175,7 +175,13 @@ class _SingleSelectMode extends _SelectMode {
var found = false;
_forEachOption((option, i) {
if (option == _unknownOption) return;
- var selected = value == null ? option == _nullOption : expando[option].ngValue == value;
+ var selected;
+ if (value == null) {
+ selected = option == _nullOption;
+ } else {
+ OptionValueDirective optionValueDirective = expando[option];
+ selected = optionValueDirective == null ? false : optionValueDirective.ngValue == value;
+ }
found = found || selected;
option.selected = selected;
});
@@ -203,7 +209,6 @@ class _MultipleSelectionMode extends _SelectMode {
onViewChange(event) {
var selected = [];
- var fn = (o, i) => o.value;
_forEachOption((o, i) {
if (o.selected) {
@@ -214,7 +219,6 @@ class _MultipleSelectionMode extends _SelectMode {
}
onModelChange(List selectedValues) {
- num index = 0;
Function fn = (o, i) => o.selected = null;
if (selectedValues is List) {
« no previous file with comments | « third_party/pkg/angular/lib/core_dom/selector.dart ('k') | third_party/pkg/angular/lib/directive/module.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698