ngx-techlify-core 11.4.1 → 11.4.2
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/ngx-techlify-core.umd.js +5 -3
- package/bundles/ngx-techlify-core.umd.js.map +1 -1
- package/bundles/ngx-techlify-core.umd.min.js +1 -1
- package/bundles/ngx-techlify-core.umd.min.js.map +1 -1
- package/esm2015/lib/searchable-selector/searchable-selector.component.js +6 -4
- package/fesm2015/ngx-techlify-core.js +5 -3
- package/fesm2015/ngx-techlify-core.js.map +1 -1
- package/lib/searchable-selector/searchable-selector.component.d.ts +1 -0
- package/ngx-techlify-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -2281,6 +2281,7 @@
|
|
|
2281
2281
|
this.edit = false;
|
|
2282
2282
|
this.sort = true;
|
|
2283
2283
|
this.items = [];
|
|
2284
|
+
this.apiDataProperty = 'data';
|
|
2284
2285
|
this.cache = false;
|
|
2285
2286
|
this.perPage = 25;
|
|
2286
2287
|
this.inDataSearch = false;
|
|
@@ -2411,12 +2412,12 @@
|
|
|
2411
2412
|
request = this.http.cache().get(this.apiUrl, { params: this.filters });
|
|
2412
2413
|
}
|
|
2413
2414
|
rxjs.of().pipe(operators.startWith(true), operators.switchMap(function (_) { return rxjs.from(request); }), operators.finalize(function () { return _this.isLoading = false; }), untilDestroy.untilDestroyed(this)).subscribe(function (result) {
|
|
2414
|
-
_this.items = _this.items.concat(result.
|
|
2415
|
+
_this.items = _this.items.concat(result[_this.apiDataProperty]);
|
|
2415
2416
|
if (_this.cache) {
|
|
2416
2417
|
_this.cachedItems = _this.items;
|
|
2417
2418
|
}
|
|
2418
|
-
_this.filters.page = result.current_page;
|
|
2419
|
-
_this.filters.lastPage = result.last_page;
|
|
2419
|
+
_this.filters.page = (result === null || result === void 0 ? void 0 : result.current_page) || 1;
|
|
2420
|
+
_this.filters.lastPage = (result === null || result === void 0 ? void 0 : result.last_page) || 1;
|
|
2420
2421
|
});
|
|
2421
2422
|
};
|
|
2422
2423
|
SearchableSelectorComponent.prototype.setDescribedByIds = function (ids) {
|
|
@@ -2580,6 +2581,7 @@
|
|
|
2580
2581
|
searchField: [{ type: i0.Input }],
|
|
2581
2582
|
itemComponent: [{ type: i0.Input }],
|
|
2582
2583
|
items: [{ type: i0.Input }],
|
|
2584
|
+
apiDataProperty: [{ type: i0.Input }],
|
|
2583
2585
|
cache: [{ type: i0.Input }],
|
|
2584
2586
|
perPage: [{ type: i0.Input }],
|
|
2585
2587
|
inDataSearch: [{ type: i0.Input }],
|