Skip to content

Commit d15cf2a

Browse files
authored
Merge pull request #5 from p9malino26/master
fix: expandNode not being awaited
2 parents 65c331f + 05c00e3 commit d15cf2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/class/qxl/datagrid/source/tree/TreeDataSource.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@ qx.Class.define("qxl.datagrid.source.tree.TreeDataSource", {
148148
},
149149

150150
/**
151-
* Returns an array of nodes whcih are on display
151+
* Returns an array of nodes which are on display
152152
* @param {*} node
153-
* @returns {Object[]}
153+
* @returns {Object[]?} Null if this node is not expanded
154154
*/
155155
getShownChildren(node) {
156-
return this._getNodeMetaData(node).childRowMetas.map(md => md.node);
156+
return this._getNodeMetaData(node).childRowMetas?.map(md => md.node) ?? null;
157157
},
158158

159159
/**
@@ -193,11 +193,11 @@ qx.Class.define("qxl.datagrid.source.tree.TreeDataSource", {
193193

194194
/**@override */
195195
async expandNode(node) {
196-
await this.queue(() => {
196+
await this.queue(async () => {
197197
let rowMeta = this._getNodeMetaData(node);
198198
// Check that the node is in the tree - it might have been removed since we were queued
199199
if (rowMeta) {
200-
this._expandNode(node);
200+
await this._expandNode(node);
201201
}
202202
});
203203
},

0 commit comments

Comments
 (0)