mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-07 23:38:14 +08:00
b6f0b634fb
Improved Knockout observableArray
12 lines
340 B
JavaScript
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();
|