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

Modify Item trough Selector

bennoinbeta opened this issue · comments

commented

It would be pretty cool if we could modify the selected Item of the Selector through the Selector.

MY_COLLECTION.collect({id: 1, name: 'hans'})
const MY_SELECTOR = MY_COLLECTION.createSelector("mySelector", 1);
MY_SELECTOR.patch({name: 'frank'});
MY_COLLECTION.getItemValue(1); // Returns' {id: 1, name: 'hans'}' but it would be cool if the value is now '{id: 1, name: 'frank'}'