mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-17 13:06:34 +02:00
Press to Enter '...' rather than Add '...'
This commit is contained in:
parent
8cb1f4a2f6
commit
ab8e65689d
2
assets/scripts/dist/choices.min.js
vendored
2
assets/scripts/dist/choices.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -873,11 +873,11 @@ export class Choices {
|
|||
const isUnique = !activeItems.some((item) => item.value === this.input.value);
|
||||
|
||||
if (this.config.maxItemCount && this.config.maxItemCount > 0 && this.config.maxItemCount <= this.itemList.children.length) {
|
||||
dropdownItem = this._getTemplate('notice', `Only ${ this.config.maxItemCount } options can be added.`);
|
||||
dropdownItem = this._getTemplate('notice', `Only ${ this.config.maxItemCount } values can be added.`);
|
||||
} else if(!this.config.duplicateItems && !isUnique) {
|
||||
dropdownItem = this._getTemplate('notice', `Only unique values can be added.`);
|
||||
} else {
|
||||
dropdownItem = this._getTemplate('notice', `Add "${ this.input.value }"`);
|
||||
dropdownItem = this._getTemplate('notice', `Press Enter to add "${ this.input.value }"`);
|
||||
}
|
||||
|
||||
if((this.config.regexFilter && this._regexFilter(this.input.value)) || !this.config.regexFilter) {
|
||||
|
|
Loading…
Reference in a new issue