Documentation

copy

makes a copy of item

id copy(id sid,number tindex, [WebixView tobj,object details] );

Parameters

sididid of source item
tindexnumberindex at which copy will be created
tobjWebixViewtarget view
detailsobjectextra parameters for moving

Returns

idid of created copy
Details

Details object can contain the next properties:

details = {};
details.newId = "123"; //new id for moved item
details.parent = "a2"; //id of new parent element

If 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 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 during copying within one and the same component.

Back to top