@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.
@@ -2044,7 +2044,6 @@ var LookupComponent = /** @class */ (function () {
2044
2044
  this.transitionOptions = "400ms cubic-bezier(0.86, 0, 0.07, 1)";
2045
2045
  this.originalFormValues = {};
2046
2046
  this.ngUnsubscribe = new Subject();
2047
- this.defaultFilterLoaded = false;
2048
2047
  }
2049
2048
  LookupComponent_1 = LookupComponent;
2050
2049
  LookupComponent.prototype.ngOnInit = function () {
@@ -2163,24 +2162,20 @@ var LookupComponent = /** @class */ (function () {
2163
2162
  };
2164
2163
  LookupComponent.prototype.setDefaultFilters = function () {
2165
2164
  var _this = this;
2166
- if (!this.defaultFilter || this.defaultFilterLoaded) {
2165
+ if (!this.defaultFilter)
2167
2166
  return;
2168
- }
2169
- var defaultFielterValues = {};
2170
2167
  this.defaultFilter
2171
- .filter(function (p) { return _this.formGroupDialog.contains(p.field); })
2172
- .forEach(function (p) {
2173
- var value;
2174
- if (p.value instanceof Function) {
2175
- value = p.value();
2176
- }
2177
- else {
2178
- value = p.value;
2179
- }
2180
- defaultFielterValues[p.field] = value;
2168
+ .filter(function (_a) {
2169
+ var field = _a.field;
2170
+ return _this.formGroupDialog.contains(field) &&
2171
+ !_this.formGroupDialog.get([field]).dirty;
2172
+ })
2173
+ .forEach(function (_a) {
2174
+ var value = _a.value, field = _a.field;
2175
+ _this.formGroupDialog
2176
+ .get([field])
2177
+ .patchValue(value instanceof Function ? value() : value);
2181
2178
  });
2182
- this.formGroupDialog.patchValue(defaultFielterValues);
2183
- this.defaultFilterLoaded = true;
2184
2179
  };
2185
2180
  LookupComponent.prototype.showDialog = function () {
2186
2181
  this.setDefaultFilters();