Merge pull request #257 from maximmig/feature/modularise-code

Addressing issue #253
This commit is contained in:
Josh Johnson 2017-09-20 09:04:40 +01:00 committed by GitHub
commit 5937afdc48
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) {