Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2020-07-24 10:59:54 +02:00
parent 8646cd43df
commit 90d74bd21a

View File

@ -12,9 +12,11 @@ export default class SelectInput extends DefaultInput {
if (!datalist) { if (!datalist) {
console.warn('Error, Datalist does not exist') console.warn('Error, Datalist does not exist')
} else { } else {
// @ts-ignore
for (const child of element.children) { for (const child of element.children) {
!(child as HTMLElement).hasAttribute('disabled') && child.remove() !(child as HTMLElement).hasAttribute('disabled') && child.remove()
} }
// @ts-ignore
for (const child of datalist.children) { for (const child of datalist.children) {
// console.log(child.value) // console.log(child.value)
element.appendChild(child.cloneNode(true)) element.appendChild(child.cloneNode(true))