swap

Swaps two fields of a field array by their index.

swap(form, name, options);

Parameters

  • form FormStore
  • name string
  • options object
    • at number
    • and number

Explanation

With at and and you define the indexes of the items to be swapped. The action is executed only if both indexes are valid.