fix(chips): mark onFocus as internal (#6519)

This commit is contained in:
Will Howell
2017-08-22 17:02:18 -04:00
committed by Kara
parent df28c3d5ab
commit 449ed194d2
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ export class MdChipList implements AfterContentInit, OnDestroy {
}
// Watch for focus events outside of the keyboard navigation
chip.onFocus.subscribe(() => {
chip._onFocus.subscribe(() => {
let chipIndex: number = this.chips.toArray().indexOf(chip);
if (this._isValidIndex(chipIndex)) {
+4 -4
View File
@@ -17,7 +17,7 @@ import {
Renderer2,
forwardRef,
} from '@angular/core';
import {Subject} from 'rxjs/Subject';
import {FocusableOption} from '../core/a11y/focus-key-manager';
import {coerceBooleanProperty} from '@angular/cdk/coercion';
import {CanColor, mixinColor} from '../core/common-behaviors/color';
@@ -109,8 +109,8 @@ export class MdChip extends _MdChipMixinBase implements FocusableOption, OnDestr
/** Whether the chip has focus. */
_hasFocus: boolean = false;
/** Emitted when the chip is focused. */
onFocus = new EventEmitter<MdChipEvent>();
/** Emits when the chip is focused. */
_onFocus = new Subject<MdChipEvent>();
/** Emitted when the chip is selected. */
@Output() select = new EventEmitter<MdChipEvent>();
@@ -145,7 +145,7 @@ export class MdChip extends _MdChipMixinBase implements FocusableOption, OnDestr
/** Allows for programmatic focusing of the chip. */
focus(): void {
this._elementRef.nativeElement.focus();
this.onFocus.emit({chip: this});
this._onFocus.next({chip: this});
}
/**