Skip to content

Commit 62161c1

Browse files
committed
fix(button-toggle): remove unused property and type ToggleType
1 parent 96c24f5 commit 62161c1

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
@@ -39,7 +39,10 @@ import {
3939
} from '@angular/material/core';
4040

4141

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

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

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

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

500499
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, 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)