Switch from ko.computed to ko.pureComputed

This should provide performance and memory benefits over regular computed observables
This commit is contained in:
djmaze 2021-12-31 13:30:05 +01:00
parent ac2238a23f
commit 954de06f86
18 changed files with 55 additions and 37 deletions

View file

@ -1,4 +1,4 @@
import ko from 'ko';
import { koComputable } from 'External/ko';
import { AbstractModel } from 'Knoin/AbstractModel';
@ -43,7 +43,7 @@ export class FilterConditionModel extends AbstractModel {
valueSecondError: false
});
this.template = ko.computed(() => {
this.template = koComputable(() => {
const template = 'SettingsFiltersCondition';
switch (this.field()) {
case FilterConditionField.Body: