Show total pages count (#164)
* Update pages.js * show x of y pages found when showing partial results --------- Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
This commit is contained in:
co-authored by
Ilya Kreymer
parent
02631740d4
commit
6a24be439c
@@ -853,6 +853,17 @@ class Pages extends LitElement
|
||||
}
|
||||
|
||||
formatResults() {
|
||||
// Default behavior: Count all available pages
|
||||
if (!this.query) {
|
||||
const length = this.collInfo.pages.length;
|
||||
if (length === this.sortedPages.length) {
|
||||
return `${length} Page${length ? "s" : ""} Found`;
|
||||
} else {
|
||||
return `${this.sortedPages.length} of ${length} Pages Found`;
|
||||
}
|
||||
}
|
||||
|
||||
// ... unless they were filtered
|
||||
if (this.sortedPages.length === 1) {
|
||||
return "1 Page Found";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user