Skip to content

Commit a04fd40

Browse files
authored
fix(angular/select): remove deprecated factory functions (#2809)
BREAKING CHANGE: * `SBB_SELECT_SCROLL_STRATEGY_PROVIDER` has been removed. * `SBB_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY` has been removed.
1 parent a7b97d8 commit a04fd40

2 files changed

Lines changed: 1 addition & 26 deletions

File tree

src/angular/select/select.module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ import { SbbOptionModule } from '@sbb-esta/angular/core';
44
import { SbbCommonModule } from '@sbb-esta/angular/core';
55
import { SbbIconModule } from '@sbb-esta/angular/icon';
66

7-
import { SbbSelect, SBB_SELECT_SCROLL_STRATEGY_PROVIDER } from './select';
7+
import { SbbSelect } from './select';
88

99
@NgModule({
1010
imports: [OverlayModule, SbbCommonModule, SbbIconModule, SbbOptionModule, SbbSelect],
1111
exports: [SbbOptionModule, OverlayModule, SbbSelect],
12-
providers: [SBB_SELECT_SCROLL_STRATEGY_PROVIDER],
1312
})
1413
export class SbbSelectModule {}

src/angular/select/select.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ import {
2121
CdkOverlayOrigin,
2222
ConnectedPosition,
2323
createRepositionScrollStrategy,
24-
Overlay,
25-
RepositionScrollStrategy,
2624
ScrollStrategy,
2725
ViewportRuler,
2826
} from '@angular/cdk/overlay';
@@ -110,17 +108,6 @@ export const SBB_SELECT_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrateg
110108
},
111109
);
112110

113-
/**
114-
* @docs-private
115-
* @deprecated Will be removed in 22.0.0.
116-
* @breaking-change 22.0.0
117-
*/
118-
export function SBB_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(
119-
overlay: Overlay,
120-
): () => RepositionScrollStrategy {
121-
return () => overlay.scrollStrategies.reposition();
122-
}
123-
124111
/** Object that can be used to configure the default options for the select module. */
125112
export interface SbbSelectConfig {
126113
/** Time to wait in milliseconds after the last keystroke before moving focus to an item. */
@@ -139,17 +126,6 @@ export interface SbbSelectConfig {
139126
/** Injection token that can be used to provide the default options the select module. */
140127
export const SBB_SELECT_CONFIG = new InjectionToken<SbbSelectConfig>('SBB_SELECT_CONFIG');
141128

142-
/**
143-
* @docs-private
144-
* @deprecated Will be removed in 22.0.0.
145-
* @breaking-change 22.0.0
146-
*/
147-
export const SBB_SELECT_SCROLL_STRATEGY_PROVIDER = {
148-
provide: SBB_SELECT_SCROLL_STRATEGY,
149-
deps: [Overlay],
150-
useFactory: SBB_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,
151-
};
152-
153129
/** Change event object that is emitted when the select value has changed. */
154130
export class SbbSelectChange<T = any> {
155131
constructor(

0 commit comments

Comments
 (0)