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 {
2020 Output ,
2121 ViewEncapsulation ,
2222 booleanAttribute ,
23+ inject ,
2324 numberAttribute ,
2425} from '@angular/core' ;
26+ import { _IdGenerator } from '@angular/cdk/a11y' ;
2527import { MatOption , ThemePalette } from '@angular/material/core' ;
2628import { MatSelect } from '@angular/material/select' ;
2729import { MatIconButton } from '@angular/material/button' ;
@@ -90,8 +92,6 @@ export const MAT_PAGINATOR_DEFAULT_OPTIONS = new InjectionToken<MatPaginatorDefa
9092 'MAT_PAGINATOR_DEFAULT_OPTIONS' ,
9193) ;
9294
93- let nextUniqueId = 0 ;
94-
9595/**
9696 * Component to provide navigation between paged information. Displays the size of the current
9797 * page, user-selectable options to change that size, what items are being shown, and
@@ -115,7 +115,7 @@ export class MatPaginator implements OnInit, OnDestroy {
115115 _formFieldAppearance ?: MatFormFieldAppearance ;
116116
117117 /** 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-' ) ;
119119
120120 private _intlChanges : Subscription ;
121121 private _isInitialized = false ;
You can’t perform that action at this time.
0 commit comments