[ADF-3918] Fix translation issue (#4169)

This commit is contained in:
Eugenio Romano
2019-01-20 23:40:07 +00:00
committed by GitHub
parent 9a70852985
commit 348bee9c6f
22 changed files with 253 additions and 201 deletions

View File

@@ -1,5 +1,4 @@
<div *ngIf="pagination?.hasMoreItems || isLoading" class="adf-infinite-pagination">
isLoading : {{isLoading}}
<button mat-button
*ngIf="!isLoading"
class="adf-infinite-pagination-load-more"

View File

@@ -27,7 +27,7 @@ import { PaginatedComponent } from './paginated-component.interface';
import { Subscription } from 'rxjs';
import { PaginationComponentInterface } from './pagination-component.interface';
import { PaginationModel } from '../models/pagination.model';
import { UserPreferencesService } from '../services/user-preferences.service';
import { UserPreferencesService, UserPreferenceValues } from '../services/user-preferences.service';
@Component({
selector: 'adf-infinite-pagination',
@@ -73,11 +73,14 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio
this.paginationSubscription = this.target.pagination.subscribe((pagination) => {
this.isLoading = false;
this.pagination = pagination;
this.pageSize = this.pageSize || this.userPreferencesService.paginationSize;
this.cdr.detectChanges();
});
}
this.userPreferencesService.select(UserPreferenceValues.PaginationSize).subscribe((pagSize) => {
this.pageSize = this.pageSize || pagSize;
});
if (!this.pagination) {
this.pagination = InfinitePaginationComponent.DEFAULT_PAGINATION;
}

View File

@@ -95,7 +95,7 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone
}
if (!this.supportedPageSizes) {
this.supportedPageSizes = this.userPreferencesService.getDefaultPageSizes();
this.supportedPageSizes = this.userPreferencesService.supportedPageSizes;
}
if (this.target) {