add select2 destroy method

This commit is contained in:
vitalets 2013-06-28 00:54:41 +04:00
parent 5c302cbdf8
commit 0db1a66aaa
2 changed files with 7 additions and 1 deletions
src/inputs

@ -155,7 +155,7 @@ To create your own input you can inherit from this class.
/**
Additional actions when destroying element
**/
destroy: function() {
destroy: function() {
},
// -------- helper functions --------

@ -229,6 +229,12 @@ $(function(){
}
}
return source;
},
destroy: function() {
if(this.$input.data('select2')) {
this.$input.select2('destroy');
}
}
});