Reputation: 7
How do i clone html from extjs ?
like a
$('#copy').append($('#orig .elem')
.clone()
.children('a')
.prepend('foo - ')
.parent()
.clone());
I thought something like
//Component 1
var comp1 = new Ext.form.TextField({});
//Component cloning...
var comp2 = comp1.cloneConfig();
But I need to add a button
Upvotes: 0
Views: 111
Reputation: 15673
ExtJS is object oriented, so instead of "cloning" you can "extend" one component from another and override any methods or properties as needed.
Upvotes: 1