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

iron-data-table dataSource change #160

Open
BartoszGalek opened this issue Oct 19, 2016 · 1 comment
Open

iron-data-table dataSource change #160

BartoszGalek opened this issue Oct 19, 2016 · 1 comment

Comments

@BartoszGalek
Copy link

iron-data-table component has a dataSource property which is a function
image

it also contains _pagesLoading
image

when the new function is being assigned to dataSource and the page is currently being loaded (slow connection) then observers are being triggered
image

_resetData clears selection, cache but does not clear loading pages
image

as a consequence the _loadPage is calling the previously set (or in my case unset) dataset function and the page is never being loaded
image

to put it in more detail:

The problem happens after the initial dataSource was invoked by the table and the page[0] started loading, but before the dataSource returned data to the callback (slow connection). Then the new dataSource is reassigned but the data are (in the above image check "else if" statement) not requested from the new dataSource, since the page is still registered in _pagesLoading.

We believe that the _pagesLoading should be reset when the table gets a new dataSource, along the lines of resetData method.

@Saulis
Copy link
Owner

Saulis commented Oct 21, 2016

Yeah I see... there's probably a related problem concerning the _cachedPages property which will be appended after the previous data request returns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants