Skip to content

Commit cf53a70

Browse files
stevenyxujelbourn
authored andcommitted
fix(button-toggle): remove unused property and type ToggleType (#19497)
(cherry picked from commit c225b28)
1 parent c85920d commit cf53a70

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ import {
4040
} from '@angular/material/core';
4141

4242

43-
/** Acceptable types for a button toggle. */
43+
/**
44+
* @deprecated No longer used.
45+
* @breaking-change 11.0.0
46+
*/
4447
export type ToggleType = 'checkbox' | 'radio';
4548

4649
/** Possible appearance styles for the button toggle. */
@@ -412,9 +415,6 @@ export class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit
412415
*/
413416
@Input('aria-labelledby') ariaLabelledby: string | null = null;
414417

415-
/** Type of the button toggle. Either 'radio' or 'checkbox'. */
416-
_type: ToggleType;
417-
418418
@ViewChild('button') _buttonElement: ElementRef<HTMLButtonElement>;
419419

420420
/** The parent button toggle group (exclusive selection). Optional. */
@@ -495,7 +495,6 @@ export class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit
495495
ngOnInit() {
496496
const group = this.buttonToggleGroup;
497497
this._isSingleSelector = group && !group.multiple;
498-
this._type = this._isSingleSelector ? 'radio' : 'checkbox';
499498
this.id = this.id || `mat-button-toggle-${_uniqueIdCounter++}`;
500499

501500
if (this._isSingleSelector) {

tools/public_api_guard/material/button-toggle.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export declare const MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR: any;
44

55
export declare class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit, AfterViewInit, CanDisableRipple, OnDestroy {
66
_buttonElement: ElementRef<HTMLButtonElement>;
7-
_type: ToggleType;
87
get appearance(): MatButtonToggleAppearance;
98
set appearance(value: MatButtonToggleAppearance);
109
ariaLabel: string;

0 commit comments

Comments
 (0)