Hello,
When i add a newly created ObservableObject to a kendoDatasource with the pushCreate method,
the datasource wraps the ObservableObject instance into a new ObservableObject without checking if it is already a kendo.data.ObservableObject.
Due to this problem the uid changes ofcourse which makes it very hard to find the ObservableObject afterwards.
The problem is that the DataSource._createNewModel doesn't check if the model is already an ObservableObject.
I think this should be changed to:
Thanks in advance.
When i add a newly created ObservableObject to a kendoDatasource with the pushCreate method,
the datasource wraps the ObservableObject instance into a new ObservableObject without checking if it is already a kendo.data.ObservableObject.
Due to this problem the uid changes ofcourse which makes it very hard to find the ObservableObject afterwards.
The problem is that the DataSource._createNewModel doesn't check if the model is already an ObservableObject.
_createNewModel: function(model) { if (this.reader.model) { return new this.reader.model(model); } return new ObservableObject(model); }I think this should be changed to:
_createNewModel: function(model) { if (this.reader.model) { return new this.reader.model(model); } if (model instanceof ObservableObject) { return model; } return new ObservableObject(model); },Thanks in advance.