mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-20 14:45:00 +02:00
Redefine input value width on item edit
This commit is contained in:
parent
8ed3fc5277
commit
30fd342b8c
|
@ -813,6 +813,7 @@ export default class Choices {
|
|||
// we can edit the item value. Otherwise if we can remove items, remove all selected items
|
||||
if (this.config.editItems && !hasHighlightedItems && lastItem) {
|
||||
this.input.value = lastItem.value;
|
||||
this.input.style.width = getWidthOfInput(this.input);
|
||||
this._removeItem(lastItem);
|
||||
this._triggerChange(lastItem.value);
|
||||
} else {
|
||||
|
|
|
@ -470,4 +470,4 @@ export const sortByAlpha = (a, b) => {
|
|||
|
||||
export const sortByScore = (a, b) => {
|
||||
return a.score - b.score;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue