-
Notifications
You must be signed in to change notification settings - Fork 2
IReadOnlyObservableCollection.filter
API / IReadOnlyObservableCollection<TItem> / filter method
This method has multiple overloads.
Creates a new JavaScript Array containing only the items the satisfy the given collection.
filter<TContext>(
predicate: (this: TContext, item: TItem, index: number, collection: this) => boolean,
thisArg?: TContext
): TItem[]
Source reference: src/collections/observableCollections/IReadOnlyObservableCollection.ts:194
.
- TContext - The context type in which the callback is executed.
-
predicate: (this:TContext, item:TItem, index:
number
, collection:this
) =>boolean
The callback indicating which items to add in the result Array. -
thisArg: TContext
A value to use as context when evaluating items.
A new Array containing the items for which the provided predicate
evaluated to true
.
Creates a new JavaScript Array containing only the items the satisfy the given collection.
filter<TResult, TContext>(
predicate: (this: TContext, item: TItem, index: number, collection: this) => item is TResult,
thisArg?: TContext
): TResult[]
Source reference: src/collections/observableCollections/IReadOnlyObservableCollection.ts:204
.
-
TResult - The type to convert each item to.
-
TContext - The context type in which the callback is executed.
-
predicate: (this:TContext, item:TItem, index:
number
, collection:this
) =>item
is TResult
The callback indicating which items to add in the result Array. -
thisArg: TContext
A value to use as context when evaluating items.
A new Array containing the items for which the provided predicate
evaluated to true
.
Overview
Motivation
Guides and Tutorials - Getting Started
Releases
CodeSandbox
API
Events
IEvent
IEventHandler
EventDispatcher
ViewModels
INotifyPropertiesChanged
ViewModel
Forms
Form
IFormFieldConfig
FormField
ReadOnlyFormCollection
FormCollection
IConfigurableFormCollection
FormSetupCallback
Validation
IValidator
ValidatorCallback
IObjectValidator
IValidatable
Validation / Triggers
WellKnownValidationTrigger
ValidationTrigger
Observable Collection
ReadOnlyObservableCollection
ObservableCollection
INotifyCollectionChanged
CollectionChangeOperation
INotifyCollectionReordered
CollectionReorderOperation
Observable Map
ReadOnlyObservableMap
ObservableMap
INotifyMapChanged
MapChangeOperation
Observable Set
ReadOnlyObservableSet
ObservableSet
INotifySetChanged
SetChangeOperation
Dependency Handling
IDependencyResolver
IDependencyContainer
DependencyContainer
useDependency
useViewModelDependency
useDependencyResolver
React Hooks
useViewModel
useViewModelMemo
useObservableCollection
useObservableMap
useObservableSet