Class

ShiftArrayItemEvent

@ng-forge/dynamic-forms

Event dispatched to remove the FIRST item from an array field.

Equivalent to JavaScript's Array.shift() - removes from the beginning. For removing from the end, use {@link PopArrayItemEvent}. For removing at a specific index, use {@link RemoveAtIndexEvent}.

Signature

class ShiftArrayItemEvent
  implements FormEvent

Properties

NameTypeDescription
type "shift-array-item"-

Examples

// Use the builder API (recommended)
eventBus.dispatch(arrayEvent('contacts').shift());

// Or instantiate directly
eventBus.dispatch(new ShiftArrayItemEvent('contacts'));