@elderbyte/ngx-starter 19.6.0 → 19.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3483,7 +3483,7 @@ class TokenChunkRequest {
|
|
|
3483
3483
|
}
|
|
3484
3484
|
static nextIfAvailable(listing, filters, sorts) {
|
|
3485
3485
|
if (listing.hasMore && listing.nextContinuationToken) {
|
|
3486
|
-
return new TokenChunkRequest(listing.nextContinuationToken, filters, sorts, listing.chunkSize);
|
|
3486
|
+
return new TokenChunkRequest(listing.nextContinuationToken, filters, sorts, listing.chunkSize ?? listing.maxChunkSize);
|
|
3487
3487
|
}
|
|
3488
3488
|
else {
|
|
3489
3489
|
return undefined;
|
|
@@ -4240,18 +4240,20 @@ class DataContextContinuableBase extends DataContextBase {
|
|
|
4240
4240
|
return this._chunkSize$.value;
|
|
4241
4241
|
}
|
|
4242
4242
|
set chunkSize(size) {
|
|
4243
|
-
|
|
4244
|
-
this._chunkSize$.next(size);
|
|
4245
|
-
this.onChunkSizeChanged(size);
|
|
4246
|
-
}
|
|
4243
|
+
this.updateChunkSize(size, true);
|
|
4247
4244
|
}
|
|
4248
4245
|
/***************************************************************************
|
|
4249
4246
|
* *
|
|
4250
4247
|
* Private Methods *
|
|
4251
4248
|
* *
|
|
4252
4249
|
**************************************************************************/
|
|
4253
|
-
|
|
4254
|
-
this.
|
|
4250
|
+
updateChunkSize(newSize, reloadOnChange) {
|
|
4251
|
+
if (this._chunkSize$.value !== newSize) {
|
|
4252
|
+
this._chunkSize$.next(newSize);
|
|
4253
|
+
if (reloadOnChange) {
|
|
4254
|
+
this.reload('ChunkSizeChanged:' + newSize);
|
|
4255
|
+
}
|
|
4256
|
+
}
|
|
4255
4257
|
}
|
|
4256
4258
|
loadAllRec() {
|
|
4257
4259
|
this.loadMore().subscribe({
|
|
@@ -4504,7 +4506,7 @@ class DataContextContinuableToken extends DataContextContinuableBase {
|
|
|
4504
4506
|
onChunkFetched(chunk) {
|
|
4505
4507
|
this.logger.debug(this.id + ': Got next chunk data:', chunk);
|
|
4506
4508
|
this._hasMoreData.next(chunk.hasMore);
|
|
4507
|
-
this.chunkSize
|
|
4509
|
+
this.updateChunkSize(chunk.chunkSize ?? chunk.maxChunkSize, false);
|
|
4508
4510
|
this.populateChunkData(chunk);
|
|
4509
4511
|
this.onIdle();
|
|
4510
4512
|
}
|
|
@@ -16030,7 +16032,7 @@ class ElderContinuatorComponent {
|
|
|
16030
16032
|
this.chunkSizeChange = output();
|
|
16031
16033
|
}
|
|
16032
16034
|
onChunkSizeChange(newSize) {
|
|
16033
|
-
if (newSize !== untracked(this.chunkSize)) {
|
|
16035
|
+
if (newSize && newSize !== untracked(this.chunkSize)) {
|
|
16034
16036
|
this.chunkSizeChange.emit(newSize);
|
|
16035
16037
|
}
|
|
16036
16038
|
}
|