From ba4bf382b1b01dd68ba50804f06e20797fa78883 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Fri, 7 Aug 2015 16:06:10 -0700 Subject: [PATCH] Use multi-prop observer; default selected to null. --- src/lib/template/array-selector.html | 12 ++++++++---- test/unit/array-selector.html | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/lib/template/array-selector.html b/src/lib/template/array-selector.html index ec3011e381..9c2682f25c 100644 --- a/src/lib/template/array-selector.html +++ b/src/lib/template/array-selector.html @@ -74,7 +74,7 @@ */ items: { type: Array, - observer: '_resetSelection' + notify: true }, /** @@ -100,11 +100,15 @@ */ multi: { type: Boolean, - observer: '_resetSelection' + value: false } }, - _resetSelection: function() { + observers: [ + '_resetSelection(items, multi)' + ], + + _resetSelection: function(items, multi) { // Unbind previous selection if (Array.isArray(this.selected)) { for (var i=0; i