mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°931 Fix bug when max allowed items set to 1
This commit is contained in:
@@ -278,6 +278,13 @@ $.widget('itop.set_widget',
|
||||
}
|
||||
}
|
||||
|
||||
// When only one item allowed, selectize doesn't trigger the _onTagRemove callback so we have to clean ourselves.
|
||||
if((this.maxItemsAllowed === 1) && (this.originalValue.length > 0)) {
|
||||
if(setItemCode !== this.originalValue[0]) {
|
||||
this.setItemsCodesStatus[this.originalValue[0]] = this.STATUS_REMOVED;
|
||||
}
|
||||
}
|
||||
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user