mirror of
https://github.com/dzeiocom/FormManager.git
synced 2025-04-22 19:02:15 +00:00
Updated RepeatInput
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
9b85d0a06a
commit
9dc6a44973
@ -10,7 +10,7 @@ import InputIdentity from './Interfaces/InputIdentity';
|
|||||||
*/
|
*/
|
||||||
export default class RepeatInput extends DefaultInput {
|
export default class RepeatInput extends DefaultInput {
|
||||||
|
|
||||||
elements: InputAbstract[][] = []
|
public elements: InputAbstract[][] = []
|
||||||
|
|
||||||
private template: DocumentFragment
|
private template: DocumentFragment
|
||||||
|
|
||||||
@ -75,7 +75,6 @@ export default class RepeatInput extends DefaultInput {
|
|||||||
const clone = document.importNode(this.template, true)
|
const clone = document.importNode(this.template, true)
|
||||||
this.element.insertBefore(clone, this.addBtn)
|
this.element.insertBefore(clone, this.addBtn)
|
||||||
let node = this.element.children.item(this.element.childElementCount-2) as HTMLElement
|
let node = this.element.children.item(this.element.childElementCount-2) as HTMLElement
|
||||||
console.log(node)
|
|
||||||
node.classList.add("fmr-element")
|
node.classList.add("fmr-element")
|
||||||
node.style.display = ""
|
node.style.display = ""
|
||||||
|
|
||||||
@ -83,7 +82,6 @@ export default class RepeatInput extends DefaultInput {
|
|||||||
let sub: InputAbstract[] = [];
|
let sub: InputAbstract[] = [];
|
||||||
(node.querySelectorAll("[data-input]") as NodeListOf<HTMLElement>).forEach((el: HTMLElement) => {
|
(node.querySelectorAll("[data-input]") as NodeListOf<HTMLElement>).forEach((el: HTMLElement) => {
|
||||||
let input = this.form.getInit(el)
|
let input = this.form.getInit(el)
|
||||||
console.log(input, values)
|
|
||||||
if (!input) {
|
if (!input) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user