Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(material/list): remove previously removed API (#26165)
In #21974 the `MatSelectionChange.option` property was removed, but we accidentally re-added it during the MDC switch. These changes re-remove the property.

Fixes #26005.
  • Loading branch information
crisbeto committed Dec 5, 2022
1 parent 2629047 commit 3d298e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
8 changes: 1 addition & 7 deletions src/material/list/selection-list.ts
Expand Up @@ -46,12 +46,6 @@ export class MatSelectionListChange {
constructor(
/** Reference to the selection list that emitted the event. */
public source: MatSelectionList,
/**
* Reference to the option that has been changed.
* @deprecated Use `options` instead, because some events may change more than one option.
* @breaking-change 12.0.0
*/
public option: MatListOption,
/** Reference to the options that have been changed. */
public options: MatListOption[],
) {}
Expand Down Expand Up @@ -213,7 +207,7 @@ export class MatSelectionList

/** Emits a change event if the selected state of an option changed. */
_emitChangeEvent(options: MatListOption[]) {
this.selectionChange.emit(new MatSelectionListChange(this, options[0], options));
this.selectionChange.emit(new MatSelectionListChange(this, options));
}

/** Implemented as part of ControlValueAccessor. */
Expand Down
3 changes: 0 additions & 3 deletions tools/public_api_guard/material/list.md
Expand Up @@ -260,10 +260,7 @@ export class MatSelectionList extends MatListBase implements SelectionList, Cont
export class MatSelectionListChange {
constructor(
source: MatSelectionList,
option: MatListOption,
options: MatListOption[]);
// @deprecated
option: MatListOption;
options: MatListOption[];
source: MatSelectionList;
}
Expand Down

0 comments on commit 3d298e0

Please sign in to comment.