update v0.0.2 twa sys
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
this.pElement = e;
|
||||
this.Headers = [];
|
||||
this.lSysRows = [];
|
||||
this.labelID = "";
|
||||
this.InitStructure();
|
||||
this.InitCss();
|
||||
this.SetIdCheckBox();
|
||||
@ -18,7 +19,8 @@
|
||||
}
|
||||
}
|
||||
SetScrollBarY(height) {
|
||||
this.absContainerRows.style.height = height + "px";
|
||||
this.absContainerRows.style.height = "auto";
|
||||
this.absContainerRows.style.maxHeight = height + "px";
|
||||
}
|
||||
AddHeader(name, width, minWidth, id = "", rowTemp = null) {
|
||||
var d = document.createElement("th");
|
||||
@ -184,10 +186,15 @@
|
||||
this.data.forEach((e, i) => {
|
||||
var r = document.createElement("tr");
|
||||
r.setAttribute("data-id", i);
|
||||
this.Headers.forEach((o) => {
|
||||
this.Headers.forEach((o, j) => {
|
||||
|
||||
var td = document.createElement("td");
|
||||
if (o.rowTemp != null) {
|
||||
td.appendChild(o.rowTemp(i, e));
|
||||
const rT = o.rowTemp(i, e);
|
||||
if (this.isCheckBox && j < 1) {
|
||||
rT.setAttribute("id", (this.labelID.length >0)?e[this.labelID]:"");
|
||||
}
|
||||
td.appendChild(rT);
|
||||
} else {
|
||||
td.innerHTML = e[o.id];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user