pull/17258/head
Sinan997 1 year ago committed by Mahmut Gundogdu
parent 4b6268ecb0
commit 8c57631766

@ -132,15 +132,17 @@ export class ListService<QueryParamsType = ABP.PageQueryParams | any> implements
}
private resetPageWhenUnchanged() {
const maxPage = Number(Number(this._totalCount / this._maxResultCount).toFixed()) // 2
const skipCount = this._page * this._maxResultCount; // 20
if(skipCount === this._totalCount){
if(this.page === maxPage && this.page > 0){
this._skipCount = skipCount - this._maxResultCount
this.page = this.page - 1;
}
}else{
const maxPage = Number(Number(this.totalCount / this._maxResultCount).toFixed());
const skipCount = this._page * this._maxResultCount;
if (skipCount !== this._totalCount) {
this._skipCount = skipCount;
return;
}
if (this.page === maxPage && this.page > 0) {
this._skipCount = skipCount - this._maxResultCount;
this.page = this.page - 1;
}
}

@ -150,7 +150,11 @@ export class ExtensibleTableComponent<R = any> implements OnChanges {
ngOnChanges({ data }: SimpleChanges) {
if (!data?.currentValue) return;
this.list.totalCount = this.recordsTotal
if (data.currentValue.length < 1) {
this.list.totalCount = this.recordsTotal
}
this.data = data.currentValue.map((record: any, index: number) => {
this.propList.forEach(prop => {
const propData = { getInjected: this.getInjected, record, index } as any;

Loading…
Cancel
Save