CollectionSelector
A selector for data
- CollectionSelector
- .id :
string
- .instanceId :
string
- .key :
DataKey
|null
- .value :
DataType
- .data :
PlexusDataInstance
|null
- .canRedo :
boolean
- .canUndo :
boolean
- .select(key) ⇒
this
- .set(value) ⇒
this
- .patch(value) ⇒
this
- .history(maxLength) ⇒
this
- .undo() ⇒
this
- .redo() ⇒
this
- .clear()
- .id :
.id : string
The internal ID of the Selector
.instanceId : string
The internal id of the Selector with an instance prefix
.key : DataKey
| null
The key of a data item assigned to this selector
.value : DataType
Return the data value of the selected item
.data : PlexusDataInstance
| null
The data of the selector
.canRedo : boolean
Can the state be redone any further?
.canUndo : boolean
Can the state be undone any further?
.select(key) ⇒ this
Select an item in the collection
Returns: this
The selector instance
Param | Type | Description |
---|---|---|
key | string | number | The key to select |
.set(value) ⇒ this
Set the value of the selected data instance
Returns: this
The selector instance
Param | Type | Description |
---|---|---|
value | DataType | The value to set |
.patch(value) ⇒ this
Patch the value of the selected data instance
Returns: this
The selector instance
Param | Type | Description |
---|---|---|
value | DataType | The value to set |
.history(maxLength) ⇒ this
Enable, disable, or set the history length of the state history stored for this selector
Returns: this
The selector instance
Param | Type | Default | Description |
---|---|---|---|
maxLength | number | 10 | The maximum length of the history |
.undo() ⇒ this
Undo the last change to the state
Returns: this
The selector instance
.redo() ⇒ this
Redo the last change to the state
Returns: this
The selector instance
.clear()
Clears the selector