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

Resource doesn't set total when data passed #700

Closed
tomdye opened this issue Mar 26, 2020 · 0 comments · Fixed by #701
Closed

Resource doesn't set total when data passed #700

tomdye opened this issue Mar 26, 2020 · 0 comments · Fixed by #701
Labels
bug Something isn't working

Comments

@tomdye
Copy link
Member

tomdye commented Mar 26, 2020

Bug

Problem
When setting data via a resource factory via the data middleware, the data passed it loaded into the resource but the total is not currently set.
This means that even though the data has been side-loaded, when you call getTotal, undefined will be returned.
This was working for data sets beneath the page size because the resource was making a call to the data templates read function which then set the data.

Example

This issue is highlighted on this sandbox: https://codesandbox.io/s/clever-tesla-erjfp

Solution

We should set the total when side-loading data via the resources set function.

@tomdye tomdye added the bug Something isn't working label Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant