@maplander/components 0.21.34 → 0.21.35

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.
@@ -2838,6 +2838,7 @@
2838
2838
  this._formBuilder = _formBuilder;
2839
2839
  this._converter = _converter;
2840
2840
  this.METERS_TO_SQ = 10.76391042;
2841
+ this._lastState = null;
2841
2842
  this.changeFilter = new core.EventEmitter();
2842
2843
  this.isOPI = this._config || false;
2843
2844
  this._subscription = new rxjs.Subscription();
@@ -2887,10 +2888,34 @@
2887
2888
  * @return {?}
2888
2889
  */
2889
2890
  function (changes) {
2891
+ var e_1, _a;
2890
2892
  if (changes['utils'] && changes['utils'].currentValue) {
2891
2893
  console.log('[FiltersComponent] utils ready');
2892
2894
  this.initComponent();
2893
2895
  }
2896
+ if (changes['stateOptions'] && changes['stateOptions'].currentValue) {
2897
+ if (this._lastState !== null) {
2898
+ try {
2899
+ for (var _b = __values(this.stateOptions), _c = _b.next(); !_c.done; _c = _b.next()) {
2900
+ var stateOption = _c.value;
2901
+ if (stateOption.name === this._lastState) {
2902
+ this.filter.state = this._lastState;
2903
+ this.filtersForm.patchValue({
2904
+ state: this._lastState
2905
+ });
2906
+ break;
2907
+ }
2908
+ }
2909
+ }
2910
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2911
+ finally {
2912
+ try {
2913
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2914
+ }
2915
+ finally { if (e_1) throw e_1.error; }
2916
+ }
2917
+ }
2918
+ }
2894
2919
  };
2895
2920
  /**
2896
2921
  * @return {?}
@@ -2929,6 +2954,7 @@
2929
2954
  * @return {?}
2930
2955
  */
2931
2956
  function (index) {
2957
+ this._lastState = this.filter.state;
2932
2958
  this.resetFilters(index);
2933
2959
  this.applyAmenities();
2934
2960
  this.filter.type = this.propertyTypeSelected.value;
@@ -2955,6 +2981,7 @@
2955
2981
  * @return {?}
2956
2982
  */
2957
2983
  function (ev) {
2984
+ this._lastState = this.filter.state;
2958
2985
  this.filter.locationType = 'STATE';
2959
2986
  this.filter.state = null;
2960
2987
  this.filter.municipality = null;
@@ -3107,6 +3134,7 @@
3107
3134
  * @return {?}
3108
3135
  */
3109
3136
  function () {
3137
+ this._lastState = this.filter.state || null;
3110
3138
  this.filtersForm.patchValue({
3111
3139
  state: this.filter.state,
3112
3140
  offering: this.filter.offering,