Class

MoveArrayItemEvent

@ng-forge/dynamic-forms

Event dispatched to move an existing item from one index to another within an array field.

This is an atomic reorder operation — the item at fromIndex is removed and reinserted at toIndex. No template is required because the existing item (resolved component, form value, and stored template) is preserved.

Signature

class MoveArrayItemEvent
  implements FormEvent

Properties

NameTypeDescription
type "move-array-item"-

Examples

// Use the builder API (recommended)
eventBus.dispatch(arrayEvent('contacts').move(0, 2));

// Or instantiate directly
eventBus.dispatch(new MoveArrayItemEvent('contacts', 0, 2));