Skip to main content

move()

moves items to different positions

move(id: Id | Id[], index: number, target?: TreeCollection, targetId?: Id): Id | Id[];

Parameters:

  • id: string | string[] - the ids of items to move
  • index: number - the index to move items to
  • target: object - optional, the target tree collection object
  • targetId: string - optional, the id of the parent item where the moved items will be placed

Returns:

The item's id or an array with ids of items.

Example

toolbar.data.move("profile_btn",-1);
note

The ID should always be a string, even if in the control configuration you've set it as a number.