@sumaris-net/ngx-components 1.4.2 → 1.4.3

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.
@@ -1476,7 +1476,7 @@
1476
1476
  this._reload$,
1477
1477
  // Search text (no distinctUntilChanged() because of the debounceTime() pipe)
1478
1478
  this.formControl.valueChanges
1479
- .pipe(operators.filter(function (value) { return _this.searchable && isNotNilString(value); }),
1479
+ .pipe(operators.filter(function (value) { return _this.enabled && _this.searchable && isNotNilString(value); }),
1480
1480
  // Mark as loading (to show loading spinner) - earlier as possible, so before the debounce time
1481
1481
  operators.tap(function (value) {
1482
1482
  if (_this.showLoadingSpinner) {
@@ -1486,7 +1486,9 @@
1486
1486
  // Filter if not enough character
1487
1487
  operators.filter(function (value) { return value.length >= _this.suggestLengthThreshold; }),
1488
1488
  // Wait a debounce time
1489
- operators.debounceTime(this.debounceTime)),
1489
+ operators.debounceTime(this.debounceTime),
1490
+ // DEBUG
1491
+ operators.tap(function (value) { return console.debug(_this.logPrefix + ' Search text changes:', value); })),
1490
1492
  // Object set: use it (no distinctUntilChanged() pipe need)
1491
1493
  this.formControl.valueChanges
1492
1494
  .pipe(operators.startWith(this.formControl.value), operators.filter(function (value) { return _this.searchable && (typeof value === 'object'); }), operators.tap(function (value) {
@@ -1501,7 +1503,9 @@
1501
1503
  _this.matInputText.nativeElement.value = _this.displayValue;
1502
1504
  }
1503
1505
  }
1504
- })),
1506
+ }),
1507
+ // DEBUG
1508
+ operators.tap(function (value) { return console.debug(_this.logPrefix + ' Received an object value: ', value); })),
1505
1509
  // Merge some observables, with a common distinctUntilChanged() pipe, and NO debounceTime
1506
1510
  rxjs.merge(
1507
1511
  // Focus or click => Load all
@@ -1515,10 +1519,10 @@
1515
1519
  // If value is a string (and is not = '*'), filter if not enough character
1516
1520
  operators.filter(function (value) { return value === '*' || !(typeof value === 'string') || value.length >= _this.suggestLengthThreshold; }),
1517
1521
  // Distinguish changes
1518
- operators.distinctUntilChanged()))
1519
- .pipe(
1522
+ operators.distinctUntilChanged(),
1520
1523
  // DEBUG
1521
- //tap(value => console.debug(this.logPrefix + ' Received update event: ', value)),
1524
+ operators.tap(function (value) { return console.debug(_this.logPrefix + ' Received update event: ', value); })))
1525
+ .pipe(
1522
1526
  // Suggest values
1523
1527
  operators.mergeMap(function (value) { return _this.suggest(value, _this.filter); }),
1524
1528
  // DEBUG