当处理selection中的total时,改变一下selection的结构以免陷入死循环

This commit is contained in:
Xu Chang 2023-11-18 15:47:37 +08:00
parent 10e0016175
commit 4765fe9eda
2 changed files with 8 additions and 2 deletions

View File

@ -1658,7 +1658,10 @@ class CascadeStore extends RowStore_1.RowStore {
}
}
if (total) {
const total2 = await this.countAsync(entity, selection, context, option);
const total2 = await this.countAsync(entity, {
filter: selection.filter,
count: total,
}, context, option);
Object.assign(rows, {
'#total': total2,
});

View File

@ -2044,7 +2044,10 @@ export abstract class CascadeStore<ED extends EntityDict & BaseEntityDict> exten
}
if (total) {
const total2 = await this.countAsync(entity, selection, context, option);
const total2 = await this.countAsync(entity, {
filter: selection.filter,
count: total,
}, context, option);
Object.assign(rows, {
'#total': total2,
});