Cleanup calls to Knockout observableArray

Improved Knockout observableArray
This commit is contained in:
djmaze 2021-01-22 12:23:20 +01:00
parent fa5476e486
commit b6f0b634fb
47 changed files with 251 additions and 276 deletions

View file

@ -2,10 +2,10 @@ import ko from 'ko';
class IdentityUserStore {
constructor() {
this.identities = ko.observableArray([]);
this.identities = ko.observableArray();
this.identities.loading = ko.observable(false).extend({ throttle: 100 });
this.getIDS = () => this.identities().map(item => (item ? item.id() : null)).filter(value => null !== value);
this.getIDS = () => this.identities.map(item => (item ? item.id() : null)).filter(value => null !== value);
}
}