AddArrayItemEvent
| Implements: | |
Event dispatched to add a new item to an array field.
This event is used to dynamically add items to array fields at runtime. The array field component listens for this event and adds a new item based on the provided field template, or uses the array's own template if not provided.
Constructor
No documentation has been provided. | ||||||||||||
Presentation | ||||||||||||
Parameters
|
Properties
| Name | Type | Description |
|---|---|---|
| type r implements | "add-array-item" |
Example usage
// Add item using array's own template
eventBus.dispatch(AddArrayItemEvent , 'contacts');
// Add item with explicit field template
const fieldTemplate = { key: 'email', type: 'input' };
eventBus.dispatch(AddArrayItemEvent , 'contacts', fieldTemplate);
// Add item at specific index
eventBus.dispatch(AddArrayItemEvent , 'contacts', fieldTemplate, 2);