From ef1b96e4452cef416cfd857cc4fe77c885b40cb0 Mon Sep 17 00:00:00 2001 From: linusbrolin Date: Wed, 25 May 2016 09:22:51 +0200 Subject: [PATCH 1/2] fixed possible dupes in filter --- components/select/select.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/select/select.ts b/components/select/select.ts index c1f39d99..a6afb975 100644 --- a/components/select/select.ts +++ b/components/select/select.ts @@ -464,7 +464,7 @@ export class GenericBehavior extends Behavior implements OptionsBehavior { .filter((option:SelectItem) => { return stripTags(option.text).match(query) && (this.actor.multiple === false || - (this.actor.multiple === true && this.actor.active.indexOf(option) < 0)); + (this.actor.multiple === true && this.actor.active.map(item => item.id).indexOf(option.id) < 0)); }); this.actor.options = options; if (this.actor.options.length > 0) { From 78151be3934852ede9700e778f9f5ca1d1c19e49 Mon Sep 17 00:00:00 2001 From: linusbrolin Date: Wed, 25 May 2016 09:39:31 +0200 Subject: [PATCH 2/2] fixed linting error --- components/select/select.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/select/select.ts b/components/select/select.ts index a6afb975..c0f71d99 100644 --- a/components/select/select.ts +++ b/components/select/select.ts @@ -464,7 +464,7 @@ export class GenericBehavior extends Behavior implements OptionsBehavior { .filter((option:SelectItem) => { return stripTags(option.text).match(query) && (this.actor.multiple === false || - (this.actor.multiple === true && this.actor.active.map(item => item.id).indexOf(option.id) < 0)); + (this.actor.multiple === true && this.actor.active.map((item: SelectItem) => item.id).indexOf(option.id) < 0)); }); this.actor.options = options; if (this.actor.options.length > 0) {