tables: add option to pass column size when creating a table
- add optionto the XmlComponent to `delete`/skip elements when exporting to xml
This commit is contained in:
@ -12,6 +12,12 @@ export abstract class XmlComponent extends BaseXmlComponent {
|
||||
|
||||
public prepForXml(): IXmlableObject {
|
||||
const children = this.root
|
||||
.filter(c => {
|
||||
if (c instanceof BaseXmlComponent) {
|
||||
return !c.isDeleted;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
.map((comp) => {
|
||||
if (comp instanceof BaseXmlComponent) {
|
||||
return comp.prepForXml();
|
||||
@ -27,4 +33,8 @@ export abstract class XmlComponent extends BaseXmlComponent {
|
||||
public addChildElement(child: XmlComponent | string) {
|
||||
this.root.push(child);
|
||||
}
|
||||
|
||||
public delete() {
|
||||
this.deleted = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user