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

List: hangs when detached then reattached to document #589

Closed
wkeese opened this issue Feb 10, 2016 · 0 comments
Closed

List: hangs when detached then reattached to document #589

wkeese opened this issue Feb 10, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@wkeese
Copy link
Member

wkeese commented Feb 10, 2016

In deliteful/samples/list/PageableList-ObservableArray.html, run this in the console:

var list = document.querySelector("d-pageable-list");
list.parentNode.removeChild(list);
list.placeAt(document.body);

The loading icon will spin endlessly, and the buttons to page the list stop working.

The root issue is that List#attachedCallback() and also delite/StoreMap#attachedCallback() were not designed to be called repeatedly.

List#attachedCallback() assumes that a new query will be starting. It sets busy to true and expects it to be set to false when _initItems() is called:

attachedCallback: dcl.superCall(function (sup) {
    ...
    this._setBusy(true, true);
    ...
}),
...
initItems: function (items) {
    ...
    this._setBusy(false, true);
    ...
},

But actually, a new query doesn't start, see ibm-js/delite#435.

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

1 participant