Browse Source

Merge pull request #6475 from ArtemDzhereleiko/bug-fix/entities-table-sort

[3.4] UI: Fixed entities table manual sort if pagination disabled
pull/6698/head
Igor Kulikov 4 years ago
committed by GitHub
parent
commit
a9eed7357d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts

6
ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts

@ -295,8 +295,10 @@ export class EntitiesTableComponent extends PageComponent implements IEntitiesTa
if (this.pageMode) {
this.route.queryParams.pipe(skip(1)).subscribe((params: PageQueryParam) => {
this.paginator.pageIndex = Number(params.page) || 0;
this.paginator.pageSize = Number(params.pageSize) || this.defaultPageSize;
if (this.displayPagination) {
this.paginator.pageIndex = Number(params.page) || 0;
this.paginator.pageSize = Number(params.pageSize) || this.defaultPageSize;
}
this.sort.active = params.property || this.entitiesTableConfig.defaultSortOrder.property;
this.sort.direction = (params.direction || this.entitiesTableConfig.defaultSortOrder.direction).toLowerCase() as SortDirection;
if (params.hasOwnProperty('textSearch') && !isEmptyStr(params.textSearch)) {

Loading…
Cancel
Save