Skip to content

Commit

Permalink
fix(paginator): page size selector not working (#7263)
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto authored and kara committed Oct 3, 2017
1 parent 38268d3 commit 2b3d795
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
12 changes: 7 additions & 5 deletions src/lib/paginator/paginator.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
{{_intl.itemsPerPageLabel}}
</div>

<mat-form-field *ngIf="_displayedPageSizeOptions.length > 1">
<mat-select class="mat-paginator-page-size-select"
[value]="pageSize"
[aria-label]="_intl.itemsPerPageLabel"
(change)="_changePageSize($event.value)">
<mat-form-field
*ngIf="_displayedPageSizeOptions.length > 1"
class="mat-paginator-page-size-select">
<mat-select
[value]="pageSize"
[aria-label]="_intl.itemsPerPageLabel"
(change)="_changePageSize($event.value)">
<mat-option *ngFor="let pageSizeOption of _displayedPageSizeOptions" [value]="pageSizeOption">
{{pageSizeOption}}
</mat-option>
Expand Down
7 changes: 1 addition & 6 deletions src/lib/paginator/paginator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,8 @@ $mat-paginator-button-increment-icon-margin: 16px;
}

.mat-paginator-page-size-select {
// Since the select won't have a placeholder we can remove the space that is reserved for it.
padding-top: 0;
margin: $mat-paginator-selector-margin;

.mat-select-trigger {
min-width: $mat-paginator-selector-trigger-min-width;
}
width: $mat-paginator-selector-trigger-min-width;
}

.mat-paginator-range-label {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/select/select-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {CommonModule} from '@angular/common';
import {MatSelect, MatSelectTrigger, MAT_SELECT_SCROLL_STRATEGY_PROVIDER} from './select';
import {MatCommonModule, MatOptionModule} from '@angular/material/core';
import {OverlayModule} from '@angular/cdk/overlay';
import {MatFormFieldModule} from '@angular/material/form-field';


@NgModule({
Expand All @@ -20,7 +21,7 @@ import {OverlayModule} from '@angular/cdk/overlay';
MatOptionModule,
MatCommonModule,
],
exports: [MatSelect, MatSelectTrigger, MatOptionModule, MatCommonModule],
exports: [MatFormFieldModule, MatSelect, MatSelectTrigger, MatOptionModule, MatCommonModule],
declarations: [MatSelect, MatSelectTrigger],
providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER]
})
Expand Down

0 comments on commit 2b3d795

Please sign in to comment.