Change default pageSize to 10 records

master
Nikola Forró 7 years ago
parent 3c5a5b48d0
commit 24d0eaf2a2

@ -53,7 +53,7 @@
</mat-table> </mat-table>
<mat-paginator [length]="dataSource?.count$ | async" [pageSize]="20" <mat-paginator [length]="dataSource?.count$ | async" [pageSize]="10"
[pageSizeOptions]="[10, 20, 50, 100]"></mat-paginator> [pageSizeOptions]="[10, 20, 50, 100]"></mat-paginator>
</div> </div>

@ -53,7 +53,7 @@ export class QuotesComponent implements OnInit, AfterViewInit {
ngOnInit() { ngOnInit() {
this.dataSource = new QuotesDataSource(this.quotesService); this.dataSource = new QuotesDataSource(this.quotesService);
this.dataSource.loadQuotes('', 'date', 'desc', 0, 20); this.dataSource.loadQuotes('', 'date', 'desc', 0, 10);
} }
ngAfterViewInit() { ngAfterViewInit() {

@ -21,7 +21,7 @@ export class QuotesService {
findQuotes( findQuotes(
filter = '', sortBy = 'date', sortOrder = 'desc', filter = '', sortBy = 'date', sortOrder = 'desc',
pageNumber = 0, pageSize = 20): Observable<Quotes> { pageNumber = 0, pageSize = 10): Observable<Quotes> {
return this.http.get('/quotes/api/quotes', { return this.http.get('/quotes/api/quotes', {
observe: 'response', observe: 'response',

Loading…
Cancel
Save