diff --git a/js/jquery.itop-tagset-widget.js b/js/jquery.itop-tagset-widget.js
index cbe251edb..f45824457 100644
--- a/js/jquery.itop-tagset-widget.js
+++ b/js/jquery.itop-tagset-widget.js
@@ -78,6 +78,8 @@ $.widget('itop.tagset_widget',
/** will hold all interactions done : code as key and one of STATUS_* constant as value */
tagSetCodesStatus: null,
+ selectizeWidget: null,
+
// the constructor
_create: function () {
var $this = this.element;
@@ -137,6 +139,8 @@ $.widget('itop.tagset_widget',
tagSetWidget._onTagRemove(value, selectizeWidget);
}
});
+
+ this.selectizeWidget = $inputWidget[0].selectize; // keeping this for widget public methods
},
refresh: function () {
@@ -166,6 +170,14 @@ $.widget('itop.tagset_widget',
this.element.val(JSON.stringify(widgetPublicData, null, (this.options.isDebug ? 2 : null)));
},
+ disable: function () {
+ this.selectizeWidget.disable();
+ },
+
+ enable: function () {
+ this.selectizeWidget.enable();
+ },
+
/**
* Updating items to have a specific rendering for partial codes.
* At first I was thinking about using the Selectize render callback, but it is called before onItemAdd/onItemRemove :(