bruce-models 1.0.4 → 1.0.5

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.
@@ -3443,6 +3443,14 @@
3443
3443
  }
3444
3444
  return this.onScanUpdate;
3445
3445
  }
3446
+ /**
3447
+ * Returns id that represents the combined menu item parameters.
3448
+ * If integrity changes while a request is running, the request will not emit a response.
3449
+ * @returns
3450
+ */
3451
+ getIntegrityId() {
3452
+ return this.tagIds == null ? "" : this.tagIds.join();
3453
+ }
3446
3454
  viewAreaSub() {
3447
3455
  this.viewAreaDispose();
3448
3456
  this.viewPortChangeRemoval = this.viewPort.Updated().Subscribe(() => {
@@ -3529,6 +3537,7 @@
3529
3537
  // Increase id so that existing loops stop.
3530
3538
  this.getterLoopId += 1;
3531
3539
  const loopId = this.getterLoopId;
3540
+ const loopIntegrity = this.getIntegrityId();
3532
3541
  new Promise(() => __awaiter(this, void 0, void 0, function* () {
3533
3542
  var _a, _b, _c, _d, _e, _f, _g, _h;
3534
3543
  // Minor delay to stop 50 menu items enabling doing their first request all together.
@@ -3587,12 +3596,13 @@
3587
3596
  sortOrder: exports.Api.ESortOrder.Asc,
3588
3597
  entityTypeConditions: this.attrFilter
3589
3598
  });
3599
+ const integrity = this.getIntegrityId();
3600
+ if (loopIntegrity == integrity && page) {
3601
+ (_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(page);
3602
+ }
3590
3603
  if (this.getterLoopId != loopId) {
3591
3604
  break;
3592
3605
  }
3593
- if (page) {
3594
- (_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(page);
3595
- }
3596
3606
  if (!postedLoading) {
3597
3607
  this.postStatus({ msg: EStatus.Loading, revoking: false });
3598
3608
  postedLoading = true;