Class
ShiftArrayItemEvent
@ng-forge/dynamic-forms
Event dispatched to remove the FIRST item from an array field.
Equivalent to JavaScript's Array. - removes from the beginning.
For removing from the end, use {@link PopArrayItemEvent}.
For removing at a specific index, use {@link RemoveAtIndexEvent}.shift()
Signature
class ShiftArrayItemEvent
implements FormEventProperties
| Name | Type | Description |
|---|---|---|
type | "shift-array-item" | - |
Examples
// Use the builder API (recommended)
eventBus.dispatch(arrayEvent('contacts').shift());
// Or instantiate directly
eventBus.dispatch(new ShiftArrayItemEvent('contacts'));packages/dynamic-forms/src/lib/events/constants/shift-array-item.event.ts:19