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 moveindex: number
- the index to move items totarget: object
- optional, the target tree collection objecttargetId: 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.