Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/list): remove previously removed API #26165

Merged
merged 1 commit into from Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point for discussion: not sure whether this is a breaking change. Technically we already removed this a couple of major versions ago.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I wasn't sure either (see issue comment). I would be good trying but at the same time we could just wait until next major.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its ok to not treat as breaking. Nobody should be using it since it was already removed, and though it was accidentally briefly added back it was still marked as deprecated.

/** 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