Skip to content

Commit

Permalink
fix(chip): mark onFocus as internal
Browse files Browse the repository at this point in the history
  • Loading branch information
willshowell committed Aug 22, 2017
1 parent 72360e2 commit 540a12b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/chips/chip-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
8 changes: 4 additions & 4 deletions src/lib/chips/chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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>();
Expand Down Expand Up @@ -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});
}

/**
Expand Down

0 comments on commit 540a12b

Please sign in to comment.