Skip to content

Commit

Permalink
feat: remove fields scheduled to be removed in 4.0 (#1439)
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
Popover:
'nbPopoverMode' input removed. Use 'nbPopoverTrigger' instead.
NbPopoverDirective 'mode' property removed. Use 'trigger' instead.

NbSelectComponent 'selectionChange' removed. Use nb-select (selected)
binding to track selection change and <nb-option (click)=""> to track
option click.
  • Loading branch information
yggg committed May 27, 2019
1 parent 526cd0e commit 28778f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
15 changes: 0 additions & 15 deletions src/framework/theme/components/popover/popover.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,6 @@ export class NbPopoverDirective implements NbDynamicOverlayController, OnChanges
@Input('nbPopoverAdjustment')
adjustment: NbAdjustment = NbAdjustment.CLOCKWISE;

/**
* Deprecated, use `trigger`
* @deprecated
* @breaking-change 4.0.0
* */
@Input('nbPopoverMode')
set mode(mode) {
console.warn(`Popover 'nbPopoverMode' input is deprecated and will be removed as of 4.0.0.
Use 'nbPopoverTrigger' instead.`);
this.trigger = mode;
}
get mode() {
return this.trigger;
}

/**
* Describes when the container will be shown.
* Available options: `click`, `hover`, `hint`, `focus` and `noop`
Expand Down
16 changes: 2 additions & 14 deletions src/framework/theme/components/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
ViewChild,
} from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { merge, Observable, Subject } from 'rxjs';
import { merge } from 'rxjs';
import { startWith, switchMap, takeWhile, filter } from 'rxjs/operators';

import {
Expand Down Expand Up @@ -551,15 +551,6 @@ export class NbSelectComponent<T> implements AfterViewInit, AfterContentInit, On
*/
overlayPosition: NbPosition = '' as NbPosition;

protected selectionChange$: Subject<NbOptionComponent<T>> = new Subject();
/**
* Stream of events that will fire when one of the options is clicked.
* @deprecated
* Use nb-select (selected) binding to track selection change and <nb-option (click)=""> to track option click.
* @breaking-change 4.0.0
**/
readonly selectionChange: Observable<NbOptionComponent<T>> = this.selectionChange$.asObservable();

protected ref: NbOverlayRef;

protected triggerStrategy: NbTriggerStrategy;
Expand Down Expand Up @@ -858,10 +849,7 @@ export class NbSelectComponent<T> implements AfterViewInit, AfterContentInit, On
}),
takeWhile(() => this.alive),
)
.subscribe((clickedOption: NbOptionComponent<T>) => {
this.handleOptionClick(clickedOption);
this.selectionChange$.next(clickedOption);
});
.subscribe((clickedOption: NbOptionComponent<T>) => this.handleOptionClick(clickedOption));
}

protected subscribeOnOverlayKeys(): void {
Expand Down

0 comments on commit 28778f7

Please sign in to comment.