File tree Expand file tree Collapse file tree 5 files changed +18
-14
lines changed Expand file tree Collapse file tree 5 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 7
7
$foreground : map-get ($theme , foreground );
8
8
9
9
.mat-paginator ,
10
- .mat-paginator-page-length-select .mat-select-trigger {
10
+ .mat-paginator-page-size .mat-select-trigger {
11
11
color : mat-color ($foreground , secondary-text );
12
12
}
13
13
33
33
}
34
34
}
35
35
36
- .mat-paginator-page-length-select .mat-select-trigger {
36
+ .mat-paginator-page-size .mat-select-trigger {
37
37
font : {
38
38
family : mat-font-family ($config );
39
39
size : mat-font-size ($config , caption );
Original file line number Diff line number Diff line change 1
- < div class ="mat-paginator-page-length-select ">
2
- < div class ="mat-paginator-items-per- page-label ">
1
+ < div class ="mat-paginator-page-size ">
2
+ < div class ="mat-paginator-page-size -label ">
3
3
{{_intl.itemsPerPageLabel}}
4
4
</ div >
5
5
6
6
< md-select *ngIf ="_displayedPageSizeOptions.length > 1 "
7
+ class ="mat-paginator-page-size-select "
7
8
[ngModel] ="pageSize "
8
9
[aria-label] ="_intl.itemsPerPageLabel "
9
10
(change) ="_changePageSize($event.value) ">
Original file line number Diff line number Diff line change 4
4
5
5
### Basic use
6
6
Each paginator instance requires:
7
- * The current page index
8
7
* The number of items per page
9
8
* The total number of items being paged
10
9
10
+ The current page index defaults to 0, but can be explicitly set via pageIndex.
11
+
11
12
When the user interacts with the paginator, a ` PageEvent ` will be fired that can be used to update
12
13
any associated data view.
13
14
14
15
### Page size options
15
16
The paginator displays a dropdown of page sizes for the user to choose from. The options for this
16
17
dropdown can be set via ` pageSizeOptions `
17
18
19
+ The current pageSize will always appear in the dropdown, even if it is not included in pageSizeOptions.
20
+
18
21
### Internationalization
19
22
The labels for the paginator can be customized by providing your own instance of ` MdPaginatorIntl ` .
20
23
This will allow you to change the following:
Original file line number Diff line number Diff line change @@ -22,17 +22,17 @@ $mat-paginator-button-increment-icon-margin: 16px;
22
22
padding : $mat-paginator-padding ;
23
23
}
24
24
25
- .mat-paginator-items-per-page-label {
26
- margin : $mat-paginator-items-per-page-label-margin ;
27
- }
28
-
29
- .mat-paginator-page-length-select {
25
+ .mat-paginator-page-size {
30
26
display : flex ;
31
27
align-items : center ;
28
+ }
32
29
33
- .mat-select {
34
- margin : $mat-paginator-selector-margin ;
35
- }
30
+ .mat-paginator-page-size-label {
31
+ margin : $mat-paginator-items-per-page-label-margin ;
32
+ }
33
+
34
+ .mat-paginator-page-size-select {
35
+ margin : $mat-paginator-selector-margin ;
36
36
37
37
.mat-select-trigger {
38
38
min-width : $mat-paginator-selector-trigger-min-width ;
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export class MdPaginator implements OnInit {
63
63
this . _pageSize = pageSize ;
64
64
this . _updateDisplayedPageSizeOptions ( ) ;
65
65
}
66
- private _pageSize : number ;
66
+ private _pageSize : number = 0 ;
67
67
68
68
/** The set of provided page size options to display to the user. */
69
69
@Input ( )
You can’t perform that action at this time.
0 commit comments