Skip to content

Commit 7dc0528

Browse files
committed
fix(material/button-toggle): 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_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY` has been removed.
1 parent 69316b8 commit 7dc0528

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

goldens/material/button-toggle/index.api.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ export const MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS: InjectionToken<MatButtonToggleDe
2323
// @public
2424
export const MAT_BUTTON_TOGGLE_GROUP: InjectionToken<MatButtonToggleGroup>;
2525

26-
// @public @deprecated
27-
export function MAT_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY(): MatButtonToggleDefaultOptions;
28-
2926
// @public
3027
export const MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR: any;
3128

src/material/button-toggle/button-toggle.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,14 @@ export const MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS = new InjectionToken<MatButtonTog
8282
'MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS',
8383
{
8484
providedIn: 'root',
85-
factory: MAT_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY,
85+
factory: () => ({
86+
hideSingleSelectionIndicator: false,
87+
hideMultipleSelectionIndicator: false,
88+
disabledInteractive: false,
89+
}),
8690
},
8791
);
8892

89-
/**
90-
* @docs-private
91-
* @deprecated No longer used, will be removed.
92-
* @breaking-change 21.0.0
93-
*/
94-
export function MAT_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY(): MatButtonToggleDefaultOptions {
95-
return {
96-
hideSingleSelectionIndicator: false,
97-
hideMultipleSelectionIndicator: false,
98-
disabledInteractive: false,
99-
};
100-
}
101-
10293
/**
10394
* Injection token that can be used to reference instances of `MatButtonToggleGroup`.
10495
* It serves as alternative token to the actual `MatButtonToggleGroup` class which

0 commit comments

Comments
 (0)