Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
johnspackman committed Sep 26, 2024
1 parent 78c78c9 commit e91a711
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions source/class/qxl/datagrid/source/tree/TreeDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ qx.Class.define("qxl.datagrid.source.tree.TreeDataSource", {
this.__rowMetaDatas = [];
if (oldValue) {
let oldRowMetaDatas = this.__rowMetaDatas;
this.__queue = [];
await this.flushQueue();
this.__rowMetaDataByNode = {};
this.__rowMetaDatas = [];
for (let rowMeta in oldRowMetaDatas) {
Expand Down Expand Up @@ -197,6 +195,7 @@ qx.Class.define("qxl.datagrid.source.tree.TreeDataSource", {
async expandNode(node) {
await this.queue(() => this._expandNode(node));
},

/**
* Expands given node.
* Is called inside of this class, so its operation is not queued.
Expand Down Expand Up @@ -271,7 +270,13 @@ qx.Class.define("qxl.datagrid.source.tree.TreeDataSource", {
* @override
*/
async collapseNode(node) {
await this.queue(() => this._collapseNode(node));
await this.queue(() => {
let rowMeta = this._getNodeMetaData(node);
// Check that the node is in the tree - it might have been removed since we were queued
if (rowMeta) {
this._collapseNode(node);
}
});
},

/**
Expand Down

0 comments on commit e91a711

Please sign in to comment.