@seniorsistemas/angular-components 16.5.3 → 16.5.4

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.
@@ -2215,7 +2215,6 @@
2215
2215
  this.transitionOptions = "400ms cubic-bezier(0.86, 0, 0.07, 1)";
2216
2216
  this.originalFormValues = {};
2217
2217
  this.ngUnsubscribe = new rxjs.Subject();
2218
- this.defaultFilterLoaded = false;
2219
2218
  }
2220
2219
  LookupComponent_1 = LookupComponent;
2221
2220
  LookupComponent.prototype.ngOnInit = function () {
@@ -2334,24 +2333,20 @@
2334
2333
  };
2335
2334
  LookupComponent.prototype.setDefaultFilters = function () {
2336
2335
  var _this = this;
2337
- if (!this.defaultFilter || this.defaultFilterLoaded) {
2336
+ if (!this.defaultFilter)
2338
2337
  return;
2339
- }
2340
- var defaultFielterValues = {};
2341
2338
  this.defaultFilter
2342
- .filter(function (p) { return _this.formGroupDialog.contains(p.field); })
2343
- .forEach(function (p) {
2344
- var value;
2345
- if (p.value instanceof Function) {
2346
- value = p.value();
2347
- }
2348
- else {
2349
- value = p.value;
2350
- }
2351
- defaultFielterValues[p.field] = value;
2339
+ .filter(function (_a) {
2340
+ var field = _a.field;
2341
+ return _this.formGroupDialog.contains(field) &&
2342
+ !_this.formGroupDialog.get([field]).dirty;
2343
+ })
2344
+ .forEach(function (_a) {
2345
+ var value = _a.value, field = _a.field;
2346
+ _this.formGroupDialog
2347
+ .get([field])
2348
+ .patchValue(value instanceof Function ? value() : value);
2352
2349
  });
2353
- this.formGroupDialog.patchValue(defaultFielterValues);
2354
- this.defaultFilterLoaded = true;
2355
2350
  };
2356
2351
  LookupComponent.prototype.showDialog = function () {
2357
2352
  this.setDefaultFilters();