@seniorsistemas/angular-components 16.3.1 → 16.3.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.
@@ -2222,7 +2222,12 @@
2222
2222
  this.onSearchRequest.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () { return (_this.loading = true); });
2223
2223
  this.onSelect.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () { return _this.onChange(_this.value); });
2224
2224
  this.onUnselect.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () { return _this.onChange(_this.value); });
2225
- this.onClear.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () { return !_this.multiple && _this.onChange(); });
2225
+ this.onClear.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () {
2226
+ if (_this.multiple || !_this.value) {
2227
+ return;
2228
+ }
2229
+ _this.onChange(null);
2230
+ });
2226
2231
  this.onFocus.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () {
2227
2232
  _this.onTouched();
2228
2233
  });
@@ -2270,8 +2275,10 @@
2270
2275
  this.autocomplete.onOverlayAnimationDone = function (event) { };
2271
2276
  };
2272
2277
  LookupComponent.prototype.ngOnChanges = function (changes) {
2273
- if (this.dialogVisible && changes.searchGridData)
2278
+ if (this.dialogVisible && changes.searchGridData) {
2274
2279
  this.loading = false;
2280
+ }
2281
+ this._setFocusFilter();
2275
2282
  };
2276
2283
  LookupComponent.prototype.ngOnDestroy = function () {
2277
2284
  this.ngUnsubscribe.next();
@@ -2447,6 +2454,14 @@
2447
2454
  this.selected = [rowData];
2448
2455
  this.select();
2449
2456
  };
2457
+ LookupComponent.prototype._setFocusFilter = function () {
2458
+ if (this.dialogVisible && !this.collapsed) {
2459
+ var input = document.querySelector("s-dynamic-form input");
2460
+ if (input) {
2461
+ input.focus();
2462
+ }
2463
+ }
2464
+ };
2450
2465
  var LookupComponent_1;
2451
2466
  LookupComponent.nextId = 0;
2452
2467
  LookupComponent.ctorParameters = function () { return [