mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(chips): mark onFocus as internal (#6519)
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user