agile-ts / agile

🌌 Global State and Logic Library for JavaScript/Typescript applications

Home Page:https://agile-ts.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prints warning when loading persisted Collection

bennoinbeta opened this issue Β· comments

commented

πŸ› Bug report

πŸ€– Current Behavior

If you store a Collection in an external Storage with some Items that were not initially added,
the Collection tries to rebuild the Group on each loaded Item when loading the Collection.
And since not every Item was loaded yet, a warning is printed that the Item doesn't exist in the Collection.

🎯 Expected behavior

Shouldn't print warning and rebuild the whole Group when one Item was loaded

Related to issue:
#113

πŸ“„ Reproducible example

https://codesandbox.io/s/agilets-first-collection-uyi9g

When adding multiple Items to the TODO-List
and then refreshing the application.
You see the warning be printed, when the persisted value is loaded into the Collection.

πŸ’‘ Suggested solution(s)

Fix Group rebuilds #113