@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.
- package/bundles/wizishop-angular-components.umd.js +14 -13
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +1 -1
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/table/table.component.js +15 -14
- package/fesm2015/wizishop-angular-components.js +14 -13
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/table/table.component.d.ts +1 -1
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.88.tgz +0 -0
- package/wizishop-angular-components-0.0.87.tgz +0 -0
|
@@ -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
|
-
|
|
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.
|
|
771
|
+
//this._tableFiltersGroup.valuesChange$.next([]);
|
|
771
772
|
// Listen to filters changes with debounced time to limit multiple api calls
|
|
772
|
-
this.filterGroupChangeSub = this.
|
|
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.
|
|
789
|
-
this.
|
|
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.
|
|
800
|
-
this.
|
|
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.
|
|
812
|
-
order: this.
|
|
813
|
-
searchValue: this.
|
|
814
|
-
itemsPerPage: this.
|
|
815
|
-
currentPage: this.
|
|
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.
|
|
821
|
+
this._tableFiltersGroup.tableFiltersValuesChange$.next(this.tableFilters);
|
|
821
822
|
};
|
|
822
823
|
TableComponent.prototype.ngDestroy = function () {
|
|
823
824
|
if (this.filterGroupChangeSub) {
|