Fixed oneCol inputs

Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2020-08-07 12:09:44 +02:00
parent 3366dda9aa
commit c2d2899a8c

View File

@ -142,15 +142,23 @@ export default class RepeatInput extends DefaultInput {
let values = []
for (const line of this.elements) {
let lineArray: any = {}
const realLine: InputAbstract[] = []
for (let i = 0; i < line.length; i++) {
const col = line[i];
if (!col.element.hasAttribute('data-ignore')) {
console.log(col)
realLine.push(col)
}
}
//one element repeat
if (line.length == 1) {
for (const col of line) {
if (realLine.length === 1) {
for (const col of realLine) {
values.push(col.getValue())
}
continue
}
// multi elements repeat
for (const col of line) {
for (const col of realLine) {
// if ()
lineArray[col.getName()] = col.getValue()
}