Skip to content

Commit 8785e5b

Browse files
committed
fixed pagination issue of 265
1 parent 27f6f3c commit 8785e5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/components/data-viewer/data-viewer.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ export class DataViewerComponent implements OnInit, OnChanges {
207207
this.loadingPageData = true;
208208
this.redisService.call(instanceId, [['SMEMBERS', key]]).subscribe(ret => {
209209
this.setCachedData = injectValuesToArray(ret[0]);
210-
this.page.totalSize = this.setCachedData.length;
211210
this.data = this.setCachedData.slice(start, end);
212211
this.loadingPageData = false;
213212
this.showPagination = true;
@@ -216,6 +215,7 @@ export class DataViewerComponent implements OnInit, OnChanges {
216215
this.showPagination = true;
217216
this.data = this.setCachedData.slice(start, end);
218217
}
218+
this.page.totalSize = this.setCachedData.length;
219219
} else if (type === 'hash') {
220220
if (!this.hashCachedData) {
221221
this.loadingPageData = true;
@@ -228,7 +228,6 @@ export class DataViewerComponent implements OnInit, OnChanges {
228228
});
229229
i += 2;
230230
}
231-
this.page.totalSize = this.hashCachedData.length;
232231
this.data = this.hashCachedData.slice(start, end);
233232
this.loadingPageData = false;
234233
this.showPagination = true;
@@ -238,6 +237,7 @@ export class DataViewerComponent implements OnInit, OnChanges {
238237
this.showPagination = true;
239238
this.data = this.hashCachedData.slice(start, end);
240239
}
240+
this.page.totalSize = this.hashCachedData.length;
241241
} else if (type === 'string') {
242242
this.stringValue = this.pageData.item.value;
243243
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy