Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dgrid Tree._expandWhenInDom generating exception #1415

Closed
jstolte opened this issue Mar 16, 2018 · 1 comment
Closed

dgrid Tree._expandWhenInDom generating exception #1415

jstolte opened this issue Mar 16, 2018 · 1 comment
Labels

Comments

@jstolte
Copy link

jstolte commented Mar 16, 2018

dgrid v1.2.1, dojo v1.13.0, dstore v1.1.1
Tree._expandWhenInDom has the following snippet at line 262...

var expandPromise = this.expand( rowElement, true, true, options.scrollingUp);
if (dfd) {
    expandPromise.then(function () {
        dfd.resolve();
    });
}

Tree.expand() starts off with the following...

if (!this._treeColumn) {
    return;
}

In my case, this._treeColumn is undefined, so this.expand() returns undefined where Tree._expandWhenInDom() is expecting a promise to be returned.

All I did to the project was update the dgrid component from 0.4.4 to 1.2.1. The dgrid instance in 0.4.4 was working fine. 1.2.1 has the problem mentioned above. I did not change anything in how the grid is being created, populated with data, and used.

The initial data populating the dstore instance does not have any child elements associated with any of the top level or parent row items... so really, there are no "rows" to "expand/collapse". No idea if that is a contributing issue to the problem or not.

For what it is worh, my naive temporary solution was to wrap the result from the call to this.expand(...) in a call to when(...).
i.e. I changed line 264 of Tree.js to

when(expandPromise).then(function () {
    ...
});

image

@dylans dylans added the bug label Mar 16, 2018
@edhager
Copy link
Contributor

edhager commented Apr 11, 2018

Thanks @jstolte!

dgrid/Tree#expand should always return a promise. I fixed it.

msssk pushed a commit that referenced this issue Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants