2018-11-21 16:24:14 +01:00
|
|
|
import {Component, Input, Output, EventEmitter} from '@angular/core';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'search-results-per-page',
|
2020-03-13 17:11:36 +01:00
|
|
|
template: `
|
|
|
|
<!-- <span class="uk-grid">-->
|
|
|
|
<!-- <div> Results per page:</div>-->
|
|
|
|
<!-- <div class="uk-width-small">-->
|
|
|
|
<!-- <mat-select class="uk-width-auto uk-text-bold matSelection" id="form-horizontal-select" name="select_results_per_page"-->
|
|
|
|
<!-- [(ngModel)]="size" (ngModelChange)="sizeChanged()"-->
|
|
|
|
<!-- [disableOptionCentering]="true"-->
|
|
|
|
<!-- panelClass="matSelectionPanel">-->
|
|
|
|
<!-- <mat-option [value]="5" > 5</mat-option>-->
|
|
|
|
<!-- <mat-option [value]="10">10</mat-option>-->
|
|
|
|
<!-- <mat-option [value]="20">20</mat-option>-->
|
|
|
|
<!-- <mat-option [value]="50">50</mat-option>-->
|
|
|
|
<!-- </mat-select>-->
|
|
|
|
<!-- </div>-->
|
|
|
|
<!-- </span>-->
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<mat-form-field class="matSelectionFormField">
|
|
|
|
<mat-label>Results per page:</mat-label>
|
|
|
|
<mat-select [(ngModel)]="size" (ngModelChange)="sizeChanged()"
|
|
|
|
[disableOptionCentering]="true"
|
|
|
|
panelClass="matSelectionPanel"
|
|
|
|
class="uk-text-bold matSelection">
|
|
|
|
<mat-option [value]="5" > 5</mat-option>
|
|
|
|
<mat-option [value]="10">10</mat-option>
|
|
|
|
<mat-option [value]="20">20</mat-option>
|
|
|
|
<mat-option [value]="50">50</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
2018-11-21 16:24:14 +01:00
|
|
|
`
|
|
|
|
})
|
|
|
|
|
|
|
|
export class SearchResultsPerPageComponent {
|
|
|
|
@Input() size: number;
|
|
|
|
@Output() sizeChange = new EventEmitter();
|
|
|
|
|
|
|
|
constructor () {}
|
|
|
|
|
2019-02-14 11:15:44 +01:00
|
|
|
ngOnInit() {}
|
2018-11-21 16:24:14 +01:00
|
|
|
|
|
|
|
sizeChanged() {
|
|
|
|
this.sizeChange.emit({
|
|
|
|
value: this.size
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|