Skip to content

Commit 61db140

Browse files
committed
update
1 parent 8785e5b commit 61db140

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,16 @@ 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;
210211
this.data = this.setCachedData.slice(start, end);
211212
this.loadingPageData = false;
212213
this.showPagination = true;
213214
});
214215
} else {
215216
this.showPagination = true;
217+
this.page.totalSize = this.setCachedData.length;
216218
this.data = this.setCachedData.slice(start, end);
217219
}
218-
this.page.totalSize = this.setCachedData.length;
219220
} else if (type === 'hash') {
220221
if (!this.hashCachedData) {
221222
this.loadingPageData = true;
@@ -228,16 +229,17 @@ export class DataViewerComponent implements OnInit, OnChanges {
228229
});
229230
i += 2;
230231
}
232+
this.page.totalSize = this.hashCachedData.length;
231233
this.data = this.hashCachedData.slice(start, end);
232234
this.loadingPageData = false;
233235
this.showPagination = true;
234236
}
235237
);
236238
} else {
237239
this.showPagination = true;
240+
this.page.totalSize = this.hashCachedData.length;
238241
this.data = this.hashCachedData.slice(start, end);
239242
}
240-
this.page.totalSize = this.hashCachedData.length;
241243
} else if (type === 'string') {
242244
this.stringValue = this.pageData.item.value;
243245
}

0 commit comments

Comments
 (0)