Hi guys,
please add OOTB support for record.clone like:
import Model from '@bryntum/grid/source/lib/Core/data/Model';
Model.prototype.clone = function () {
return this.copy(this.id);
};Thanks
Vadim
Hi Vadim,
Thanks — we already provide this via Model.copy(). See Model.copy.
Best regards,
Tasnim
How to ask for help? Please read our Support Policy
Hi Vadim,
Model.copy is what we ship today: https://bryntum.com/products/grid/docs/api/Core/data/Model#function-copy
If you want a clone alias in your app you can add one easily. Example that by default creates a new id, but can preserve the id if desired:
import Model from '@bryntum/grid/source/lib/Core/data/Model';
Model.prototype.clone = function(preserveId = false) {
return this.copy(preserveId ? this.id : undefined);
};clone is different than copy
Could you please let us know what do expect from clone that you don't see in copy?
Best regards,
Tasnim
How to ask for help? Please read our Support Policy