-
Notifications
You must be signed in to change notification settings - Fork 2
MapItemValidationTrigger
API / MapItemValidationTrigger<TKey, TItem> class
Represents a map item validation trigger. Instead of triggering a validation only when the map changes, a validation may be triggered by any of the contained items when they themselves change.
This is useful when within the collection there is a field that needs to be unique, such as a unique name for each item in the collection.
Extends ValidationTrigger<INotifyMapChanged<TKey, TItem> & Iterable<[TKey, TItem]>>.
class MapItemValidationTrigger<TKey, TItem>
extends ValidationTrigger<INotifyMapChanged<TKey, TItem> | Iterable<[TKey, TItem]>>
Source reference: src/validation/triggers/MapItemValidationTrigger.ts:45
.
-
TKey - The type of keys the map contains.
-
TItem - The type of items the map contains.
-
constructor - Initializes a new instance of the
MapItemValidationTrigger<TKey, TItem>
class.
-
inherited
readonly
trigger - Gets the source object that triggers validation. -
inherited
readonly
validationTriggered - Gets an event that is raised whenever the source object triggers a validation.
-
override
protected
subscribeToTarget - Subscribes to map and item changes. -
override
protected
unsubscribeFromTarget - Unsubscribes from map and item changes.
-
ValidationTrigger<TTrigger>
- ViewModelChangedValidationTrigger<TViewModel>
- CollectionChangedValidationTrigger<TItem, TCollection>
- CollectionReorderedValidationTrigger<TItem, TCollection>
- SetChangedValidationTrigger<TItem, TSet>
- MapChangedValidationTrigger<TKey, TItem, TMap>
- CollectionItemValidationTrigger<TItem>
- SetItemValidationTrigger<TItem>
- MapItemValidationTrigger<TKey, TItem>
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