mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
e324e2f6b6
koArrayWithDestroy creates ko.observableArray and calls the desired onDestroy() on entry delete.
13 lines
343 B
JavaScript
13 lines
343 B
JavaScript
import { addObservablesTo, koArrayWithDestroy } from 'External/ko';
|
|
|
|
export const AccountUserStore = {
|
|
accounts: koArrayWithDestroy(),
|
|
loading: ko.observable(false).extend({ debounce: 100 }),
|
|
|
|
getEmailAddresses: () => AccountUserStore.accounts.map(item => item.email)
|
|
};
|
|
|
|
addObservablesTo(AccountUserStore, {
|
|
email: '',
|
|
signature: ''
|
|
});
|