@@ -41,7 +41,7 @@ import {MdChip, MdChipEvent, MdChipSelectionChange} from './chip';
41
41
import { MdChipInput } from './chip-input' ;
42
42
import { MdFormFieldControl } from '../form-field/form-field-control' ;
43
43
44
-
44
+ // Increasing integer for generating unique ids for chip-list components.
45
45
let nextUniqueId = 0 ;
46
46
47
47
/** Change event object that is emitted when the chip list value has changed. */
@@ -138,7 +138,7 @@ export class MdChipList implements MdFormFieldControl<any>, ControlValueAccessor
138
138
139
139
protected _value : any ;
140
140
141
- /** Placeholder for the chip list. Alternatively, placeholder can set to MdChipInput */
141
+ /** Placeholder for the chip list. Alternatively, placeholder can be set on MdChipInput */
142
142
protected _placeholder : string ;
143
143
144
144
/** Tab index for the chip list. */
@@ -246,7 +246,7 @@ export class MdChipList implements MdFormFieldControl<any>, ControlValueAccessor
246
246
247
247
/**
248
248
* Whether or not this chip is selectable. When a chip is not selectable,
249
- * it's selected state is always ignored.
249
+ * its selected state is always ignored.
250
250
*/
251
251
@Input ( )
252
252
get selectable ( ) : boolean { return this . _selectable ; }
@@ -277,7 +277,7 @@ export class MdChipList implements MdFormFieldControl<any>, ControlValueAccessor
277
277
@Output ( ) change : EventEmitter < MdChipListChange > = new EventEmitter < MdChipListChange > ( ) ;
278
278
279
279
/**
280
- * Event that emits whenever the raw value of the select changes. This is here primarily
280
+ * Event that emits whenever the raw value of the chip-list changes. This is here primarily
281
281
* to facilitate the two-way binding for the `value` input.
282
282
* @docs -private
283
283
*/
@@ -452,7 +452,7 @@ export class MdChipList implements MdFormFieldControl<any>, ControlValueAccessor
452
452
let chipIndex : number = this . chips . toArray ( ) . indexOf ( chip ) ;
453
453
if ( this . _isValidIndex ( chipIndex ) ) {
454
454
if ( chip . _hasFocus ) {
455
- // Check whether the chip is the last item
455
+ // Check whether the chip is not the last item
456
456
if ( chipIndex < this . chips . length - 1 ) {
457
457
this . _keyManager . setActiveItem ( chipIndex ) ;
458
458
} else if ( chipIndex - 1 >= 0 ) {
@@ -519,8 +519,8 @@ export class MdChipList implements MdFormFieldControl<any>, ControlValueAccessor
519
519
}
520
520
521
521
/**
522
- * Finds and selects and option based on its value.
523
- * @returns Option that has the corresponding value.
522
+ * Finds and selects the chip based on its value.
523
+ * @returns Chip that has the corresponding value.
524
524
*/
525
525
private _selectValue ( value : any , isUserInput : boolean = true ) : MdChip | undefined {
526
526
@@ -546,8 +546,8 @@ export class MdChipList implements MdFormFieldControl<any>, ControlValueAccessor
546
546
}
547
547
548
548
/**
549
- * Clears the select trigger and deselects every option in the list.
550
- * @param skip Option that should not be deselected.
549
+ * Deselects every chip in the list.
550
+ * @param skip Chip that should not be deselected.
551
551
*/
552
552
private _clearSelection ( skip ?: MdChip ) : void {
553
553
this . _selectionModel . clear ( ) ;
@@ -625,7 +625,7 @@ export class MdChipList implements MdFormFieldControl<any>, ControlValueAccessor
625
625
}
626
626
}
627
627
628
- /** Listens to user-generated selection events on each option . */
628
+ /** Listens to user-generated selection events on each chip . */
629
629
private _listenToChipsSelection ( ) : void {
630
630
this . _chipSelectionSubscription = this . chipSelectionChanges . subscribe ( event => {
631
631
event . source . selected
@@ -637,7 +637,7 @@ export class MdChipList implements MdFormFieldControl<any>, ControlValueAccessor
637
637
} ) ;
638
638
}
639
639
640
- /** Listens to user-generated selection events on each option . */
640
+ /** Listens to user-generated selection events on each chip . */
641
641
private _listenToChipsFocus ( ) : void {
642
642
this . _chipFocusSubscription = this . chipFocusChanges . subscribe ( event => {
643
643
let chipIndex : number = this . chips . toArray ( ) . indexOf ( event . chip ) ;
0 commit comments