-
Notifications
You must be signed in to change notification settings - Fork 36
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
Double load of the first page of a PageableList #538
Comments
cc: @wkeese it is strange that attached is now set before attachment? |
I think the reason But I think setting /**
* Set to true when `attachedCallback()` has completed, and false when `detachedCallback()` called.
* @member {boolean}
* @protected
*/
attached: false, So I'll make that change.
Perhaps that also makes sense, but I'll do the first change for now. |
PS: Thanks for tracking this down. |
…not before. Refs #385, fixes ibm-js/deliteful#538, refs ibm-js/deliteful#539.
The modification of CustomElement attachedCallback function in this commit ibm-js/delite@b3638c5 lead to a problem of double load of the first page of a list.
It is due to a double pass in the if of "initial loading" in the computeProperties function of PageableList.
There is, first, a modification of the store attribute and then a modification of the _collection attribute.
In the previous version, the store was in the props list before the attached attribute was set at true. Also the only time we passed in the "initial loading if" was when the _collection was modified.
But in this version the store is in the props list at the same as this.attached attribute. There is then one pass because the store has been modified and another because of the _collection, and the page is loaded twice.
There are two solutions of this problem :
I don't think I have enough knowledge of the code to be able to properly grasp all the impact of this modifications.
Tell me what you think about it.
The text was updated successfully, but these errors were encountered: