Улучшено отображение количества найденных результатов

This commit is contained in:
Book Pauk
2022-12-04 19:36:27 +07:00
parent c2e1d062e8
commit fd66034ba9
6 changed files with 42 additions and 11 deletions

View File

@@ -672,10 +672,11 @@ class DbSearcher {
const s = row.value.substring(0, depth);
let g = group.get(s);
if (!g) {
g = {id: row.id, name: row.name, value: s, count: 0};
g = {id: row.id, name: row.name, value: s, count: 0, bookCount: 0};
group.set(s, g);
}
g.count++;
g.bookCount += row.bookCount;
}
const result = Array.from(group.values());