mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-09 09:22:19 +02:00
Merge branch 'feature/modularise-code' of github.com:jshjohnson/Choices into feature/modularise-code
This commit is contained in:
commit
498e45f6db
|
@ -408,7 +408,7 @@ const example = new Choices(element, {
|
||||||
### renderSelectedChoices
|
### renderSelectedChoices
|
||||||
**Type:** `String` **Default:** `auto`
|
**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`.
|
**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`.
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"classnames": "^2.2.5",
|
"classnames": "^2.2.5",
|
||||||
"fuse.js": "^2.2.2",
|
"fuse.js": "^3.1.0",
|
||||||
"redux": "^3.3.1"
|
"redux": "^3.3.1"
|
||||||
},
|
},
|
||||||
"npmName": "choices.js",
|
"npmName": "choices.js",
|
||||||
|
|
2
src/scripts/dist/choices.js
vendored
2
src/scripts/dist/choices.js
vendored
|
@ -428,7 +428,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
if (_this.isSelectOneElement) {
|
if (_this.isSelectOneElement) {
|
||||||
return choice.groupId === group.id;
|
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) {
|
if (groupChoices.length >= 1) {
|
||||||
|
|
2
src/scripts/dist/choices.js.map
vendored
2
src/scripts/dist/choices.js.map
vendored
File diff suppressed because one or more lines are too long
6
src/scripts/dist/choices.min.js
vendored
6
src/scripts/dist/choices.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -345,7 +345,7 @@ class Choices {
|
||||||
if (this.isSelectOneElement) {
|
if (this.isSelectOneElement) {
|
||||||
return choice.groupId === group.id;
|
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) {
|
if (groupChoices.length >= 1) {
|
||||||
|
|
|
@ -71,7 +71,7 @@ const choices = (state = [], action) => {
|
||||||
// Set active state based on whether choice is
|
// Set active state based on whether choice is
|
||||||
// within filtered results
|
// within filtered results
|
||||||
choice.active = filteredResults.some((result) => {
|
choice.active = filteredResults.some((result) => {
|
||||||
if (result.item.id === choice.id) {
|
if (result.id === choice.id) {
|
||||||
choice.score = result.score;
|
choice.score = result.score;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue