Breaking change between 4.2.6 and 4.2.14

The properties created on an object using Object.create( are no longer accessible when added to a DataCollection.

Example:

function AppData(){}
AppData.prototype = Object.create(Object.prototype, {
id: {
 configurable: false,
 get: function() { 1; }
},
value: {
 configurable: false,
 get: function() { 1; }
})

var c = new webix.DataCollection();
c.parse([
  new AppData(),
]);

After retrieving the object from the datacollection, the properties value and id are no longer present. This worked fine in 4.2.6 and before.

Any ideas?

I was wrong with the assumption that is is related to the datacollection itself. The problem seems to be the sync code. Please see the following example:

http://webix.com/snippet/c760047a

The datatable should show data with value == “b” only. Instead you will see the error message shown that the value property does not exist.

The source for the datatable is a DataCollection synced from another collection. The data stored in the master collection (“ca”) is fine but not the data on the synced collection (“cb”).

Yep, it is a side effect of some other fix. Sorry for the inconvenience. The correct build will be available on Monday.

Please beware that for TreeDataCollection the above issue will still occur ( during treestore sync, component will do the full copy of objects, which will result in loss of advanced object properties )

Thanks maksim, 4.2.16 seems to work fine again :slight_smile:

Hi maksim,

sorry, we were still referencing 4.2.6. and I tried today with 4.2.16 which has the same issue. You can see the issue on my snippet:

http://webix.com/snippet/c760047a

Properties are not available.

Do you have an idea how to workaround this issue?

Hi,

I have sent you the link to the latest build by PM, hopefully it will resolve the issue.