move()
moves items to different positions
move(id: (string | number) | (string | number)[], index: number, target?: object, targetId?: (string | number) | (string | number)[]): (string | number) | (string | number)[];
Parameters:
id: (string | number) | (string | number)[]
- the ids of items to moveindex: number
- the index to move items totarget: object
- optional, the target tree collection objecttargetId: (string | number) | (string | number)[]
- 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.