@wizishop/angular-components 0.0.87 → 0.0.88

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.
@@ -764,12 +764,13 @@
764
764
  this.headerCheckBoxId = uuid.v4(); // Create checkbox unique id
765
765
  /* Handle routing filters */
766
766
  if (this.tableRoutingName) {
767
- this._filterGroup = this.filtersTableService.getTableFilterGroup(this.tableRoutingName);
767
+ console.log('ngOnInit TableComponent');
768
+ this._tableFiltersGroup = this.filtersTableService.getTableFilterGroup(this.tableRoutingName);
768
769
  this.setTablesFilters();
769
770
  // Performe initial fetch data
770
- this._filterGroup.valuesChange$.next([]);
771
+ //this._tableFiltersGroup.valuesChange$.next([]);
771
772
  // Listen to filters changes with debounced time to limit multiple api calls
772
- this.filterGroupChangeSub = this._filterGroup.valuesChange$.subscribe(function (filters) {
773
+ this.filterGroupChangeSub = this._tableFiltersGroup.valuesChange$.subscribe(function (filters) {
773
774
  console.log('valuesChange', filters);
774
775
  _this.setTablesFilters();
775
776
  });
@@ -785,8 +786,8 @@
785
786
  this.tableFilters.currentPage = 1;
786
787
  this.tableFiltersChange.emit(this.tableFilters);
787
788
  // Reset routing filters
788
- if (this._filterGroup) {
789
- this._filterGroup.setValues({
789
+ if (this._tableFiltersGroup) {
790
+ this._tableFiltersGroup.setValues({
790
791
  searchValue: this.tableFilters.searchValue,
791
792
  sort: undefined,
792
793
  order: undefined,
@@ -796,8 +797,8 @@
796
797
  };
797
798
  TableComponent.prototype.pageChange = function () {
798
799
  this.tableFiltersChange.emit(this.tableFilters);
799
- if (this._filterGroup) {
800
- this._filterGroup.setValues({
800
+ if (this._tableFiltersGroup) {
801
+ this._tableFiltersGroup.setValues({
801
802
  itemsPerPage: this.tableFilters.itemsPerPage,
802
803
  currentPage: this.tableFilters.currentPage
803
804
  });
@@ -808,16 +809,16 @@
808
809
  * */
809
810
  TableComponent.prototype.setTablesFilters = function () {
810
811
  this.tableFilters = {
811
- sort: this._filterGroup.get('sort'),
812
- order: this._filterGroup.get('order'),
813
- searchValue: this._filterGroup.get('searchValue'),
814
- itemsPerPage: this._filterGroup.get('itemsPerPage') ? parseInt(this._filterGroup.get('itemsPerPage')) : 0,
815
- currentPage: this._filterGroup.get('currentPage') ? parseInt(this._filterGroup.get('currentPage')) : 0,
812
+ sort: this._tableFiltersGroup.get('sort'),
813
+ order: this._tableFiltersGroup.get('order'),
814
+ searchValue: this._tableFiltersGroup.get('searchValue'),
815
+ itemsPerPage: this._tableFiltersGroup.get('itemsPerPage') ? parseInt(this._tableFiltersGroup.get('itemsPerPage')) : 0,
816
+ currentPage: this._tableFiltersGroup.get('currentPage') ? parseInt(this._tableFiltersGroup.get('currentPage')) : 0,
816
817
  totalItems: this.tableFilters.totalItems
817
818
  };
818
819
  this.tableFiltersChange.emit(this.tableFilters);
819
820
  console.log('tableFiltersValuesChange$.next');
820
- this._filterGroup.tableFiltersValuesChange$.next(this.tableFilters);
821
+ this._tableFiltersGroup.tableFiltersValuesChange$.next(this.tableFilters);
821
822
  };
822
823
  TableComponent.prototype.ngDestroy = function () {
823
824
  if (this.filterGroupChangeSub) {