@sumaris-net/ngx-components 1.5.4 → 1.5.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.
@@ -544,18 +544,17 @@
544
544
  target = target.slice();
545
545
  target.sort(propertiesPathComparator(keys));
546
546
  var total = items.length || 0;
547
- var fetchMore;
548
547
  // Truncate if need
549
548
  if (opts) {
550
549
  if (isNil(opts.offset) && opts.offset > 0) {
551
- items = items.slice(opts.offset);
550
+ target = target.slice(opts.offset);
552
551
  }
553
- if (isNotNil(opts.size) && items.length > opts.size) {
554
- items = items.slice(0, opts.size);
552
+ if (isNotNil(opts.size) && target.length > opts.size) {
553
+ target = target.slice(0, opts.size);
555
554
  }
556
555
  }
557
556
  var res = {
558
- data: items,
557
+ data: target,
559
558
  total: total
560
559
  };
561
560
  // Add fetch more capability, if total was fetched
@@ -1146,11 +1145,11 @@
1146
1145
  });
1147
1146
  });
1148
1147
  }
1149
- function waitForTrue(predicate, opts) {
1148
+ function waitForTrue(observable, opts) {
1150
1149
  return __awaiter(this, void 0, void 0, function () {
1151
1150
  var firstTrueObservable, $timeout;
1152
1151
  return __generator(this, function (_a) {
1153
- firstTrueObservable = predicate.pipe(operators.first(function (v) { return v === true; }), operators.map(function () { }) // convert to void
1152
+ firstTrueObservable = observable.pipe(operators.first(function (v) { return v === true; }), operators.map(function () { }) // convert to void
1154
1153
  );
1155
1154
  // Timeout (+ dueTime)
1156
1155
  if (opts && opts.timeout > 0) {