Skip to content

refactor(select): remove 6.0.0 deletion targets #10163

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

Merged
merged 1 commit into from
Mar 13, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/paginator/paginator.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<mat-select
[value]="pageSize"
[aria-label]="_intl.itemsPerPageLabel"
(change)="_changePageSize($event.value)">
(selectionChange)="_changePageSize($event.value)">
<mat-option *ngFor="let pageSizeOption of _displayedPageSizeOptions" [value]="pageSizeOption">
{{pageSizeOption}}
</mat-option>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/select/select.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2686,7 +2686,7 @@ describe('MatSelect', () => {
const spy = jasmine.createSpy('change spy');

fixture.detectChanges();
instance.select.change.subscribe(() => spy(instance.selectedFood));
instance.select.selectionChange.subscribe(() => spy(instance.selectedFood));

expect(instance.selectedFood).toBeFalsy();

Expand Down
35 changes: 5 additions & 30 deletions src/lib/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,43 +433,18 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit,
/** Event emitted when the select panel has been toggled. */
@Output() readonly openedChange: EventEmitter<boolean> = new EventEmitter<boolean>();

/** Event emitted when the select has been opened. */
@Output('opened')
get _openedStream(): Observable<void> {
return this.openedChange.pipe(filter(o => o), map(() => {}));
}
/** Event emitted when the select has been opened. */
@Output('opened') readonly _openedStream: Observable<void> =
this.openedChange.pipe(filter(o => o), map(() => {}));

/** Event emitted when the select has been closed. */
@Output('closed')
get _closedStream(): Observable<void> {
return this.openedChange.pipe(filter(o => !o), map(() => {}));
}

/**
* Event emitted when the select has been opened.
* @deprecated Use `openedChange` instead.
* @deletion-target 6.0.0
*/
@Output() readonly onOpen: Observable<void> = this._openedStream;

/**
* Event emitted when the select has been closed.
* @deprecated Use `openedChange` instead.
* @deletion-target 6.0.0
*/
@Output() readonly onClose: Observable<void> = this._closedStream;
@Output('closed') readonly _closedStream: Observable<void> =
this.openedChange.pipe(filter(o => !o), map(() => {}));

/** Event emitted when the selected value has been changed by the user. */
@Output() readonly selectionChange: EventEmitter<MatSelectChange> =
new EventEmitter<MatSelectChange>();

/**
* Event emitted when the selected value has been changed by the user.
* @deprecated Use `selectionChange` instead.
* @deletion-target 6.0.0
*/
@Output() readonly change: EventEmitter<MatSelectChange> = this.selectionChange;

/**
* Event that emits whenever the raw value of the select changes. This is here primarily
* to facilitate the two-way binding for the `value` input.
Expand Down