-
Notifications
You must be signed in to change notification settings - Fork 2
ReadOnlyObservableCollection.map
API / ReadOnlyObservableCollection<TItem> / map method
Creates a new JavaScript Array constructed by mapping each item in the collection using a callback.
This is a public method.
public map<TResult>(callbackfn: (item: TItem, index: number, collection: IReadOnlyObservableCollection<TItem>) => TResult): TResult[]
- TResult: the type to map each item to.
-
callbackfn: Function, the callback mapping each item.
- item: TItem, the item being mapped.
- index: Number, the index of the item being mapped.
- collection: IReadOnlyObservableCollection<TItem>, the collection being iterated.
Returns: TResult[]
A new Array containing the mapped items.
Creates a new JavaScript Array constructed by mapping each item in the collection using a callback.
This is a public method.
public map<TResult, TContext>(callbackfn: (this: TContext, item: TItem, index: number, collection: IReadOnlyObservableCollection<TItem>) => TResult, thisArg: TContext): TResult[]
- TResult: the type to map each item to.
- TContext: the context type in which the callback is executed.
-
callbackfn: Function, the callback mapping each item.
- item: TItem, the item being mapped.
- index: Number, the index of the item being mapped.
- collection: IReadOnlyObservableCollection<TItem>, the collection being iterated.
- thisArg: TContext, a value to use as the callback context when mapping items.
Returns: TResult[]
A new Array containing the mapped items.
Motivation
Overview
Guides and Tutorials - Getting Started
Releases
API
Events
IEvent
IEventHandler
INotifyPropertiesChanged
INotifyCollectionChanged
IItemAddedEventArgs
IItemRemovedEventArgs
ICollectionChange
ItemRemovedCallback
ICollectionChange
EventDispatcher
Observable Collections
IReadOnlyObservableCollection
IObservableCollection
ReadOnlyObservableCollection
ObservableCollection
ViewModels
ViewModel
isViewModel
Forms
IFormFieldViewModel
IFormFieldViewModelConfig
FormFieldViewModel
FormFieldCollectionViewModel
FormFieldSet
DynamicFormFieldCollectionViewModel
Validation
IReadOnlyValidatable
IValidatable
IValidationConfig
ValidatorCallback
CollectionItemValidatorCallback
ValidatableSelectorCallback
ValidationConfigSelectorCallback
UnsubscribeCallback
registerValidators
registerCollectionValidators
registerCollectionItemValidators
React Hooks
EventHandler
useEvent
ViewModelType
ViewModelFactory
useViewModel
useViewModelMemo
useObservableCollection
useValidators
useCollectionValidators
useCollectionItemValidators