UI: refactoring
This commit is contained in:
parent
0725cd6600
commit
863200d6e7
@ -262,7 +262,7 @@
|
|||||||
class="no-data-found">{{ 'common.loading' | translate }}</span>
|
class="no-data-found">{{ 'common.loading' | translate }}</span>
|
||||||
</div>
|
</div>
|
||||||
<mat-divider *ngIf="displayPagination"></mat-divider>
|
<mat-divider *ngIf="displayPagination"></mat-divider>
|
||||||
<mat-paginator [fxShow]="displayPagination"
|
<mat-paginator *ngIf="displayPagination"
|
||||||
[length]="dataSource.total() | async"
|
[length]="dataSource.total() | async"
|
||||||
[pageIndex]="pageLink.page"
|
[pageIndex]="pageLink.page"
|
||||||
[pageSize]="pageLink.pageSize"
|
[pageSize]="pageLink.pageSize"
|
||||||
|
|||||||
@ -295,8 +295,10 @@ export class EntitiesTableComponent extends PageComponent implements IEntitiesTa
|
|||||||
|
|
||||||
if (this.pageMode) {
|
if (this.pageMode) {
|
||||||
this.route.queryParams.pipe(skip(1)).subscribe((params: PageQueryParam) => {
|
this.route.queryParams.pipe(skip(1)).subscribe((params: PageQueryParam) => {
|
||||||
|
if (this.displayPagination) {
|
||||||
this.paginator.pageIndex = Number(params.page) || 0;
|
this.paginator.pageIndex = Number(params.page) || 0;
|
||||||
this.paginator.pageSize = Number(params.pageSize) || this.defaultPageSize;
|
this.paginator.pageSize = Number(params.pageSize) || this.defaultPageSize;
|
||||||
|
}
|
||||||
this.sort.active = params.property || this.entitiesTableConfig.defaultSortOrder.property;
|
this.sort.active = params.property || this.entitiesTableConfig.defaultSortOrder.property;
|
||||||
this.sort.direction = (params.direction || this.entitiesTableConfig.defaultSortOrder.direction).toLowerCase() as SortDirection;
|
this.sort.direction = (params.direction || this.entitiesTableConfig.defaultSortOrder.direction).toLowerCase() as SortDirection;
|
||||||
if (params.hasOwnProperty('textSearch') && !isEmptyStr(params.textSearch)) {
|
if (params.hasOwnProperty('textSearch') && !isEmptyStr(params.textSearch)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user