snappymail/dev/Stores/User/Identity.js
the-djmaze e324e2f6b6 Replaced tricky delegateRunOnDestroy() with koArrayWithDestroy()
koArrayWithDestroy creates ko.observableArray and calls the desired onDestroy() on entry delete.
2022-02-17 12:48:57 +01:00

7 lines
308 B
JavaScript

import { koArrayWithDestroy } from 'External/ko';
export const IdentityUserStore = koArrayWithDestroy();
IdentityUserStore.getIDS = () => IdentityUserStore.map(item => (item ? item.id() : null))
.filter(value => null !== value);
IdentityUserStore.loading = ko.observable(false).extend({ debounce: 100 });