Created
May 31, 2023 17:20
-
-
Save gmcharlt/3b311f7e62a175bb78bf3570c2e05ede to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.ts | |
index 6aeddab851e..65580b13ff2 100644 | |
--- a/Open-ILS/src/eg2/src/app/share/grid/grid.ts | |
+++ b/Open-ILS/src/eg2/src/app/share/grid/grid.ts | |
@@ -1466,6 +1466,11 @@ export class GridDataSource { | |
checkAllRetrieved(pager: Pager, idx: number) { | |
if (this.allRowsRetrieved) { return; } | |
+ if (pager.resultCount > 0) { | |
+ if (!this.data.includes(undefined)) { | |
+ this.allRowsRetrieved = true; | |
+ } | |
+ } | |
if (idx === 0 || idx < (pager.limit + pager.offset)) { | |
// last query returned nothing or less than one page. | |
// confirm we have all of the preceding pages. | |
diff --git a/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts b/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts | |
index 47caf682a70..058c915e357 100644 | |
--- a/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts | |
+++ b/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts | |
@@ -198,8 +198,6 @@ export class HoldsGridComponent implements OnInit { | |
this.store.getItem(this.preFetchSetting).then( | |
applied => this.enablePreFetch = Boolean(applied) | |
); | |
- } else { | |
- this.enablePreFetch = false; | |
} | |
if (!this.defaultSort) { | |
@@ -386,6 +384,9 @@ export class HoldsGridComponent implements OnInit { | |
if (first) { // First response is the hold count. | |
this.holdsCount = Number(holdData); | |
first = false; | |
+ if (this.enablePreFetch) { | |
+ pager.resultCount = this.holdsCount; | |
+ } | |
} else { // Subsequent responses are hold data blobs | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment