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:
Igor Bulovski
2018-04-26 14:16:02 +02:00
parent e67f5f80e1
commit dc136daeab
5 changed files with 63 additions and 15 deletions

View File

@ -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;
}
}