Addressing issue #253

This commit is contained in:
Maxim Mig 2017-09-19 16:22:00 +03:00
parent 020905676a
commit 955716d846
5 changed files with 7 additions and 7 deletions

View file

@ -408,7 +408,7 @@ const example = new Choices(element, {
### renderSelectedChoices
**Type:** `String` **Default:** `auto`
**Input types affected:** `select-one`, `select-multiple`
**Input types affected:** `select-multiple`
**Usage:** Whether selected choices should be removed from the list. By default choices are removed when they are selected in multiple select box. To always render choices pass `always`.

View file

@ -428,7 +428,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (_this.isSelectOneElement) {
return choice.groupId === group.id;
}
return choice.groupId === group.id && !choice.selected;
return choice.groupId === group.id && (_this.config.renderSelectedChoices === 'always' || !choice.selected);
});
if (groupChoices.length >= 1) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -345,7 +345,7 @@ class Choices {
if (this.isSelectOneElement) {
return choice.groupId === group.id;
}
return choice.groupId === group.id && !choice.selected;
return choice.groupId === group.id && (this.config.renderSelectedChoices === 'always' || !choice.selected);
});
if (groupChoices.length >= 1) {