|
|
|
@ -178,7 +178,12 @@ export class ExtensibleTableComponent<R = any> implements OnChanges { |
|
|
|
|
|
|
|
ngOnChanges({ data, recordsTotal }: SimpleChanges) { |
|
|
|
if (data?.currentValue.length < 1 && recordsTotal?.currentValue > 0) { |
|
|
|
let maxPage = Number(Number(recordsTotal?.currentValue / this.list.maxResultCount).toFixed()); |
|
|
|
let maxPage = Math.floor(Number(Number(recordsTotal?.currentValue / this.list.maxResultCount))); |
|
|
|
|
|
|
|
if(recordsTotal?.currentValue < this.list.maxResultCount) { |
|
|
|
this.list.page = 0; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (recordsTotal?.currentValue % this.list.maxResultCount === 0) { |
|
|
|
maxPage -= 1; |
|
|
|
|