Skip to content

Commit b8feeb0

Browse files
committed
Add tree.destroy()
Update mar10#977
1 parent ad58797 commit b8feeb0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# 2.33.1-0 / Unreleased
1+
# 2.34.0-0 / Unreleased
22
* TODO: tree.hasFocus() more reliable.
33
* [Added] `tree.debugTime()`, `tree.debugTimeEnd()` for debugging.
4+
* [Added] `tree.destroy()` as shortcut for `tree.widget.destroy()`.
45
* [Fixed] #973 when use ext-grid in one tree, other tree not use ext-grid has error on click.
56
* [Fixed] #974 ext-grid: too much output in production mode.
67
* [Fixed] #975 ext-grid: fix `tree.visitRows()` for empty tree.

src/jquery.fancytree.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3066,6 +3066,13 @@
30663066
consoleApply("log", arguments);
30673067
}
30683068
},
3069+
/** Destroy this widget, restore previous markup and cleanup resources.
3070+
*
3071+
* @since 2.33
3072+
*/
3073+
destroy: function() {
3074+
this.widget.destroy();
3075+
},
30693076
/** Enable (or disable) the tree control.
30703077
*
30713078
* @param {boolean} [flag=true] pass false to disable

0 commit comments

Comments
 (0)