PrependArrayItemEvent
| Generic types: | TTemplate |
| Implements: | |
Event dispatched to prepend a new item at the BEGINNING of an array field.
Use this when new items should appear at the start of the list. For appending to the end, use {@link AppendArrayItemEvent}.
Constructor
No documentation has been provided. | |||||||||
Presentation | |||||||||
Parameters
|
Properties
| Name | Type | Description |
|---|---|---|
| type r implements | "prepend-array-item" |
Example usage
// Object item: prepend { name } object
eventBus.dispatch(arrayEvent ('contacts').prepend([
{ key: 'name', type: 'input', label: 'Name' }
]));
// Primitive item: prepend single value
eventBus.dispatch(arrayEvent ('tags').prepend(
{ key: 'tag', type: 'input', label: 'Tag' }
));