File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ import {
20
20
Output ,
21
21
ViewEncapsulation ,
22
22
booleanAttribute ,
23
+ inject ,
23
24
numberAttribute ,
24
25
} from '@angular/core' ;
26
+ import { _IdGenerator } from '@angular/cdk/a11y' ;
25
27
import { MatOption , ThemePalette } from '@angular/material/core' ;
26
28
import { MatSelect } from '@angular/material/select' ;
27
29
import { MatIconButton } from '@angular/material/button' ;
@@ -90,8 +92,6 @@ export const MAT_PAGINATOR_DEFAULT_OPTIONS = new InjectionToken<MatPaginatorDefa
90
92
'MAT_PAGINATOR_DEFAULT_OPTIONS' ,
91
93
) ;
92
94
93
- let nextUniqueId = 0 ;
94
-
95
95
/**
96
96
* Component to provide navigation between paged information. Displays the size of the current
97
97
* page, user-selectable options to change that size, what items are being shown, and
@@ -115,7 +115,7 @@ export class MatPaginator implements OnInit, OnDestroy {
115
115
_formFieldAppearance ?: MatFormFieldAppearance ;
116
116
117
117
/** ID for the DOM node containing the paginator's items per page label. */
118
- readonly _pageSizeLabelId = ` mat-paginator-page-size-label-${ nextUniqueId ++ } ` ;
118
+ readonly _pageSizeLabelId = inject ( _IdGenerator ) . getId ( ' mat-paginator-page-size-label-' ) ;
119
119
120
120
private _intlChanges : Subscription ;
121
121
private _isInitialized = false ;
You can’t perform that action at this time.
0 commit comments