Skip to content

Commit 479b4e3

Browse files
committed
fix(material/select): remove deprecated factory functions
Removes factory functions that we had marked as deprecated for v21. These functions aren't necessary since we switched to standalone. BREAKING CHANGE: * `MAT_SELECT_SCROLL_STRATEGY_PROVIDER` has been removed. * `MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY` has been removed.
1 parent 29c296f commit 479b4e3

File tree

3 files changed

+1
-35
lines changed

3 files changed

+1
-35
lines changed

goldens/material/select/index.api.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ export const MAT_SELECT_CONFIG: InjectionToken<MatSelectConfig>;
4848
// @public
4949
export const MAT_SELECT_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
5050

51-
// @public @deprecated
52-
export const MAT_SELECT_SCROLL_STRATEGY_PROVIDER: {
53-
provide: InjectionToken<() => ScrollStrategy>;
54-
deps: any[];
55-
useFactory: typeof MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY;
56-
};
57-
58-
// @public @deprecated
59-
export function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(_overlay: unknown): () => ScrollStrategy;
60-
6151
// @public
6252
export const MAT_SELECT_TRIGGER: InjectionToken<MatSelectTrigger>;
6353

src/material/select/select-module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {NgModule} from '@angular/core';
1111
import {MatCommonModule, MatOptionModule} from '../core';
1212
import {MatFormFieldModule} from '../form-field';
1313
import {CdkScrollableModule} from '@angular/cdk/scrolling';
14-
import {MatSelect, MatSelectTrigger, MAT_SELECT_SCROLL_STRATEGY_PROVIDER} from './select';
14+
import {MatSelect, MatSelectTrigger} from './select';
1515

1616
@NgModule({
1717
imports: [OverlayModule, MatOptionModule, MatCommonModule, MatSelect, MatSelectTrigger],
@@ -23,6 +23,5 @@ import {MatSelect, MatSelectTrigger, MAT_SELECT_SCROLL_STRATEGY_PROVIDER} from '
2323
MatOptionModule,
2424
MatCommonModule,
2525
],
26-
providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER],
2726
})
2827
export class MatSelectModule {}

src/material/select/select.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,6 @@ export const MAT_SELECT_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrateg
105105
},
106106
);
107107

108-
/**
109-
* @docs-private
110-
* @deprecated No longer used, will be removed.
111-
* @breaking-change 21.0.0
112-
*/
113-
export function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(
114-
_overlay: unknown,
115-
): () => ScrollStrategy {
116-
const injector = inject(Injector);
117-
return () => createRepositionScrollStrategy(injector);
118-
}
119-
120108
/** Object that can be used to configure the default options for the select module. */
121109
export interface MatSelectConfig {
122110
/** Whether option centering should be disabled. */
@@ -147,17 +135,6 @@ export interface MatSelectConfig {
147135
/** Injection token that can be used to provide the default options the select module. */
148136
export const MAT_SELECT_CONFIG = new InjectionToken<MatSelectConfig>('MAT_SELECT_CONFIG');
149137

150-
/**
151-
* @docs-private
152-
* @deprecated No longer used, will be removed.
153-
* @breaking-change 21.0.0
154-
*/
155-
export const MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {
156-
provide: MAT_SELECT_SCROLL_STRATEGY,
157-
deps: [] as any[],
158-
useFactory: MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,
159-
};
160-
161138
/**
162139
* Injection token that can be used to reference instances of `MatSelectTrigger`. It serves as
163140
* alternative token to the actual `MatSelectTrigger` class which could cause unnecessary

0 commit comments

Comments
 (0)