Made sure suggest widgets automatically clean up their stuff when they get removed.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1604 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-10-18 17:44:42 +00:00
parent c4456fdba5
commit a28b6fe21e

View File

@ -1,4 +1,17 @@
(function() { (function() {
/*
* Make suggest widgets clean up when removed.
*/
var oldInit = $.suggest.suggest.prototype._init;
$.suggest.suggest.prototype._init = function() {
oldInit.call(this);
var self = this;
this.input.bind("remove", function() {
self._destroy();
});
};
/* /*
* Property suggest * Property suggest
*/ */