Data Collection Copy

Hi,
I would like to have a copy of a datacollection
like:

    var collectionstaffselectbox = new webix.DataCollection({
        url: "data/staff/staff_webix_listconnector_select.php",
        save: "connector->data/staff/staff_webix_listconnector_select.php",
        autoupdate: true
    });
var collectionstaffselectbox_ohneunsichtbar = webix.copy(collectionstaffselectbox);

When I do that, I get the error in the console:
"Attempt to copy object with self reference".

Is there another way to do that?

Thanks a lot,
Martin

Comments

  • To avoid such conflict, please use the copy of a non-initialized object:

    var collection = {
            url: "data/staff/staff_webix_listconnector_select.php",
            save: "connector->data/staff/staff_webix_listconnector_select.php",
            autoupdate: true
    }
    
    var collectionstaffselectbox = new webix.DataCollection(
            webix.copy(collection)
    );
    
    // etc.
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion