@firestitch/filter 12.0.0 → 12.0.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.
@@ -139,6 +139,7 @@ export declare class FilterComponent implements OnInit, AfterViewInit, OnDestroy
139
139
  search(event: any): void;
140
140
  reload(event?: any): void;
141
141
  getItem(name: any): BaseItem<any>;
142
+ fetchQueryParams(): void;
142
143
  /**
143
144
  * Call change callback and apply new filter values
144
145
  */
@@ -31,6 +31,7 @@ export declare class ExternalParamsController implements OnDestroy {
31
31
  reloadFiltersWithValues(params: IFilterExternalParams, shouldResetSavedFilters?: boolean): void;
32
32
  initItems(): void;
33
33
  _initItemsValues(): void;
34
+ fetchQueryParams(): void;
34
35
  private _initPersistance;
35
36
  private _initQueryParams;
36
37
  private _initSavedFilters;
@@ -2134,7 +2134,15 @@
2134
2134
  item.model = values[item.name];
2135
2135
  }
2136
2136
  else {
2137
- item.clear();
2137
+ if (item instanceof RangeItem) {
2138
+ item.clearRange(null, item.defaultValue);
2139
+ }
2140
+ else if (item instanceof BaseDateRangeItem) {
2141
+ item.clearDateRange(null, item.defaultValue);
2142
+ }
2143
+ else {
2144
+ item.clear();
2145
+ }
2138
2146
  }
2139
2147
  });
2140
2148
  if (this.sortByItem) {
@@ -2816,6 +2824,10 @@
2816
2824
  this._saveQueryParams();
2817
2825
  this._savePersistedParams();
2818
2826
  };
2827
+ ExternalParamsController.prototype.fetchQueryParams = function () {
2828
+ this._initQueryParams();
2829
+ this._itemsStore.updateItemsWithValues(this.params);
2830
+ };
2819
2831
  ExternalParamsController.prototype._initPersistance = function () {
2820
2832
  this._persistanceStore.init(this._config.persist, this._config.namespace, this._config.case);
2821
2833
  };
@@ -4891,6 +4903,9 @@
4891
4903
  return this.items
4892
4904
  .find(function (item) { return item.name === name; });
4893
4905
  };
4906
+ FilterComponent.prototype.fetchQueryParams = function () {
4907
+ this._externalParams.fetchQueryParams();
4908
+ };
4894
4909
  /**
4895
4910
  * Call change callback and apply new filter values
4896
4911
  */