Comment doc for Collection#getId().
This commit is contained in:
parent
3da2a618b9
commit
d78522f5e1
@ -57,8 +57,12 @@ export default class Collection extends EventEmitter {
|
||||
this._size = 0
|
||||
}
|
||||
|
||||
getKey (item) {
|
||||
return item && item.id
|
||||
// Overridable method used to compute the key of an item when
|
||||
// unspecified.
|
||||
//
|
||||
// Default implementation returns the `id` property.
|
||||
getKey (value) {
|
||||
return value && value.id
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user