Skip to content

Commit add8f16

Browse files
committed
fix(material/list): breaking changes for v22
Breaking changes for the `material/list` module in v22. BREAKING CHANGE: * `MatListOption.checkboxPosition` has been removed. use `togglePosition` instead. * `MatListOptionCheckboxPosition` has been renamed to `MatListOptionTogglePosition`.
1 parent ffb23f6 commit add8f16

3 files changed

Lines changed: 3 additions & 29 deletions

File tree

goldens/material/list/index.api.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,6 @@ export class MatListModule {
161161

162162
// @public (undocumented)
163163
export class MatListOption extends MatListItemBase implements ListOption, OnInit, OnDestroy {
164-
// @deprecated
165-
get checkboxPosition(): MatListOptionTogglePosition;
166-
set checkboxPosition(value: MatListOptionTogglePosition);
167164
get color(): ThemePalette;
168165
set color(newValue: ThemePalette);
169166
focus(): void;
@@ -201,15 +198,13 @@ export class MatListOption extends MatListItemBase implements ListOption, OnInit
201198
get value(): any;
202199
set value(newValue: any);
203200
// (undocumented)
204-
static ɵcmp: i0.ɵɵComponentDeclaration<MatListOption, "mat-list-option", ["matListOption"], { "togglePosition": { "alias": "togglePosition"; "required": false; }; "checkboxPosition": { "alias": "checkboxPosition"; "required": false; }; "color": { "alias": "color"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectedChange": "selectedChange"; }, ["_lines", "_titles"], ["[matListItemAvatar],[matListItemIcon]", "[matListItemTitle]", "[matListItemLine]", "*", "mat-divider"], true, never>;
201+
static ɵcmp: i0.ɵɵComponentDeclaration<MatListOption, "mat-list-option", ["matListOption"], { "togglePosition": { "alias": "togglePosition"; "required": false; }; "color": { "alias": "color"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectedChange": "selectedChange"; }, ["_lines", "_titles"], ["[matListItemAvatar],[matListItemIcon]", "[matListItemTitle]", "[matListItemLine]", "*", "mat-divider"], true, never>;
205202
// (undocumented)
206203
static ɵfac: i0.ɵɵFactoryDeclaration<MatListOption, never>;
207204
}
208205

209206
// @public
210-
type MatListOptionTogglePosition = 'before' | 'after';
211-
export { MatListOptionTogglePosition as MatListOptionCheckboxPosition }
212-
export { MatListOptionTogglePosition }
207+
export type MatListOptionTogglePosition = 'before' | 'after';
213208

214209
// @public
215210
export class MatListSubheaderCssMatStyler {

src/material/list/list-option.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,6 @@ export class MatListOption extends MatListItemBase implements ListOption, OnInit
118118
/** Whether the label should appear before or after the checkbox/radio. Defaults to 'after' */
119119
@Input() togglePosition: MatListOptionTogglePosition = 'after';
120120

121-
/**
122-
* Whether the label should appear before or after the checkbox/radio. Defaults to 'after'
123-
*
124-
* @deprecated Use `togglePosition` instead.
125-
* @breaking-change 17.0.0
126-
*/
127-
@Input() get checkboxPosition(): MatListOptionTogglePosition {
128-
return this.togglePosition;
129-
}
130-
set checkboxPosition(value: MatListOptionTogglePosition) {
131-
this.togglePosition = value;
132-
}
133-
134121
/**
135122
* Theme color of the list option. This sets the color of the checkbox/radio.
136123
* This API is supported in M2 themes only, it has no effect in M3 themes. For color customization

src/material/list/public-api.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,4 @@ export * from './list-item-sections';
1717
export * from './tokens';
1818

1919
export {MatListOption} from './list-option';
20-
21-
export {
22-
MatListOptionTogglePosition,
23-
/**
24-
* @deprecated Use `MatListOptionTogglePosition` instead.
25-
* @breaking-change 17.0.0
26-
*/
27-
MatListOptionTogglePosition as MatListOptionCheckboxPosition,
28-
} from './list-option-types';
20+
export {MatListOptionTogglePosition} from './list-option-types';

0 commit comments

Comments
 (0)