add select2 destroy method
This commit is contained in:
parent
5c302cbdf8
commit
0db1a66aaa
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 --------
|
||||
|
6
src/inputs/select2/select2.js
vendored
6
src/inputs/select2/select2.js
vendored
@ -229,6 +229,12 @@ $(function(){
|
||||
}
|
||||
}
|
||||
return source;
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
if(this.$input.data('select2')) {
|
||||
this.$input.select2('destroy');
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user