ngrx-forms
Version:
Proper integration of forms in Angular 4 applications using ngrx
12 lines (11 loc) • 633 B
TypeScript
import { FormArrayState } from '../state';
/**
* This update function takes two indices and returns a projection function that swaps the
* child controls at those indices in a form array state.
*/
export declare function swapArrayControl(fromIndex: number, toIndex: number): <TValue>(state: FormArrayState<TValue>) => FormArrayState<TValue>;
/**
* This update function takes a form array state and two indices and swaps the
* child controls at those indices in the state.
*/
export declare function swapArrayControl<TValue>(state: FormArrayState<TValue>, fromIndex: number, toIndex: number): FormArrayState<TValue>;