@indice/ng-components 0.2.158-beta.4 → 0.2.158-beta.5

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.
@@ -3697,18 +3697,14 @@
3697
3697
  ];
3698
3698
  // disabled external route changes monitoring due to sync issues - which is bad :) - refresh from url will not work
3699
3699
  // until i come up with a solution...
3700
- this.routeSub$ = this.route$.queryParamMap.pipe(operators.finalize(function () {
3701
- // just to sync params in query on subscription complete or error
3702
- _this.setRouteParams(true);
3703
- _this.load();
3704
- })).subscribe(function (params) {
3700
+ this.routeSub$ = this.route$.queryParamMap.subscribe(function (params) {
3705
3701
  if (params.keys.length === 0) {
3706
3702
  return;
3707
3703
  }
3708
3704
  // changing the view mode does not require reloading...
3709
3705
  _this.view = params.get('view') || ListViewType.Tiles;
3710
3706
  // console.log('route changes ', this.view);
3711
- if (params.get('search') !== _this.search) {
3707
+ if (params.get('search') !== null && params.get('search') !== _this.search) {
3712
3708
  _this.searchChanged(params.get('search'));
3713
3709
  }
3714
3710
  var page = +(params.get('page') || 1);
@@ -3729,9 +3725,13 @@
3729
3725
  _this.sortdir = params.get('dir');
3730
3726
  }
3731
3727
  });
3728
+ // just to sync params in query
3729
+ this.setRouteParams(true);
3730
+ this.load();
3732
3731
  };
3733
3732
  BaseListComponent.prototype.setRouteParams = function (locationChange) {
3734
3733
  if (locationChange === void 0) { locationChange = false; }
3734
+ console.log(this.sortdir);
3735
3735
  this.router$.navigate([], {
3736
3736
  relativeTo: this.route$, queryParams: {
3737
3737
  view: this.view,