mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Cleanup calls to Knockout observableArray
Improved Knockout observableArray
This commit is contained in:
parent
fa5476e486
commit
b6f0b634fb
47 changed files with 251 additions and 276 deletions
|
|
@ -2,9 +2,9 @@ import ko from 'ko';
|
|||
|
||||
class DomainAdminStore {
|
||||
constructor() {
|
||||
this.domains = ko.observableArray([]);
|
||||
this.domains = ko.observableArray();
|
||||
this.domains.loading = ko.observable(false).extend({ 'throttle': 100 });
|
||||
this.domainsWithoutAliases = ko.computed(() => this.domains().filter(item => item && !item.alias));
|
||||
this.domainsWithoutAliases = ko.computed(() => this.domains.filter(item => item && !item.alias));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import ko from 'ko';
|
|||
|
||||
class PackageAdminStore {
|
||||
constructor() {
|
||||
this.packages = ko.observableArray([]);
|
||||
this.packages = ko.observableArray();
|
||||
this.packages.loading = ko.observable(false).extend({ throttle: 100 });
|
||||
|
||||
ko.addObservablesTo(this, {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import ko from 'ko';
|
|||
|
||||
class PluginAdminStore {
|
||||
constructor() {
|
||||
this.plugins = ko.observableArray([]);
|
||||
this.plugins = ko.observableArray();
|
||||
this.plugins.loading = ko.observable(false).extend({ throttle: 100 });
|
||||
this.plugins.error = ko.observable('');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue