snappymail/dev/Stores/User/Identity.js
djmaze b6f0b634fb Cleanup calls to Knockout observableArray
Improved Knockout observableArray
2021-01-22 12:23:20 +01:00

12 lines
340 B
JavaScript

import ko from 'ko';
class IdentityUserStore {
constructor() {
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);
}
}
export default new IdentityUserStore();