-
Notifications
You must be signed in to change notification settings - Fork 2
IReadOnlyObservableCollection
API / IReadOnlyObservableCollection<TItem> interface
Represents a read-only observable collection based on the Array interface.
Extends Iterable<TItem>, ArrayLike<TItem>, INotifyPropertiesChanged, INotifyCollectionChanged<TItem>, INotifyCollectionReordered<TItem>.
interface IReadOnlyObservableCollection<TItem>
extends Iterable<TItem>, ArrayLike<TItem>, INotifyPropertiesChanged, INotifyCollectionChanged<TItem>, INotifyCollectionReordered<TItem>
Source reference: src/collections/observableCollections/IReadOnlyObservableCollection.ts:11
.
- TItem - The type of items the collection contains.
-
readonly
length - Gets the number of items in the collection. -
inherited
readonly
collectionChanged - An event that is raised when the collection changed by adding or removing items. -
inherited
readonly
collectionReordered - An event that is raised when the collection changed. -
inherited
readonly
propertiesChanged - An event that is raised when one or more properties may have changed.
- [iterator] - Gets an iterator that provides each element in the collection.
- at - Gets the item at the provided index.
- concat - Merges the current collection with the given Array and returns a new JavaScript Array.
- entries - Gets an iterator that provides index-item pairs for each element in the collection.
- every - Checks whether all elements in the collection satisfy a given condition.
- filter - Creates a new JavaScript Array containing only the items the satisfy the given collection.
- find - Returns the first item that satisfies the given condition.
- findIndex - Returns the index of the first item that satisfies the given condition.
- findLast - Returns the last item that satisfies the given condition.
- findLastIndex - Returns the index of the last item that satisfies the given condition.
-
forEach - Iterates over the entire collections executing the
callback
for each. - includes - Checks whether the provided item is in the collection.
-
indexOf - Returns the first index of an item, or
-1
if none can be found. -
join - Aggregates the contained items into a
String
placing the providedseparator
between them. - keys - Gets an iterator that provides the indexes for each element in the collection.
-
lastIndexOf - Returns the last index of an item, or
-1
if none can be found. - map - Creates a new JavaScript Array constructed by mapping each item in the collection.
- reduce - Reduces the collection to a single item.
- reduceRight - Reduces the collection to a single item iterating the collection from end to start.
-
slice - Returns a new JavaScript Array containing the elements starting at the provided
start
index up to, but not including, the providedend
index. - some - Checks whether some elements in the collection satisfy a given condition.
- toArray - Converts the observable collection to a native JavaScript Array.
- toReversed - Returns a JavaScript Array containing the items of the collection in reverse order.
- toSorted - Returns a JavaScript Array containing the items of the collection in ascending order.
- toSpliced - Returns a JavaScript Array containing the spliced items of the collection.
- values - Gets an iterator that provides each element in the collection.
- with - Returns a JavaScript Array containing the elements from the collection and having the one at the provided index replaced with the provided value.
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