dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/searchUtils/searchResultsPerPage.component.ts @ 59113
1 |
import {Component, Input, Output, EventEmitter} from '@angular/core'; |
---|---|
2 |
|
3 |
@Component({ |
4 |
selector: 'search-results-per-page', |
5 |
template: ` |
6 |
<div>
|
7 |
<mat-form-field class="matSelectionFormField">
|
8 |
<mat-label>Results per page:</mat-label>
|
9 |
<mat-select [(ngModel)]="size" (ngModelChange)="sizeChanged()"
|
10 |
[disableOptionCentering]="true"
|
11 |
panelClass="matSelectionPanel"
|
12 |
class="uk-text-bold matSelection">
|
13 |
<mat-option [value]="5" > 5</mat-option>
|
14 |
<mat-option [value]="10">10</mat-option>
|
15 |
<mat-option [value]="20">20</mat-option>
|
16 |
<mat-option [value]="50">50</mat-option>
|
17 |
</mat-select>
|
18 |
</mat-form-field>
|
19 |
</div>
|
20 |
`
|
21 |
})
|
22 |
|
23 |
export class SearchResultsPerPageComponent { |
24 |
@Input() size: number; |
25 |
@Output() sizeChange = new EventEmitter(); |
26 |
|
27 |
constructor () {} |
28 |
|
29 |
ngOnInit() {} |
30 |
|
31 |
sizeChanged() { |
32 |
this.sizeChange.emit({ |
33 |
value: this.size |
34 |
});
|
35 |
}
|
36 |
}
|