makes a copy of an item
sid | id | the ID of a source item |
tindex | number | the index a copy will be created at |
tobj | object | optional, the target view |
details | object | optional, extra parameters for moving |
number | the auto-generated id of the created copy |
The details object can contain the following properties:
details = {};
details.newId = "123"; // a new id for the moved item
details.parent = "a2"; // the id of a new parent element
If the parent is defined, tindex will be the child index inside the target branch.
If parent is not defined, the value will be set to 0 (will be added to the tree root).
In case newId is not defined, the new ID will be the same as the ID of the source item (sid), which is not desirable while copying takes place within one and the same component.
Back to top