This commit is contained in:
RubenPX 2022-04-29 14:07:04 +02:00
parent 8bbca0301b
commit c78c9c5d7d
2 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@
if (all) { if (all) {
return [...document.querySelectorAll(el)] return [...document.querySelectorAll(el)]
} }
return document.querySelector(el) return document.querySelector(el)
} }

View File

@ -51,7 +51,7 @@ class TableController {
/** /**
* @returns All inputs from current page in device list * @returns All inputs from current page in device list
*/ */
static getAllDevicesInCurrentPage() { static getAllDevicesInCurrentPage() {
return this.#tableRowsPage() return this.#tableRowsPage()
.map(element => element.querySelector("input")) .map(element => element.querySelector("input"))
} }
@ -65,7 +65,7 @@ class TableController {
return DOMElements.map(element => { return DOMElements.map(element => {
const info = {} const info = {}
info.checked = element.checked info.checked = element.checked
Object.values(element.attributes).forEach(attrib => {info[attrib.nodeName.replace(/-/g, "_")] = attrib.nodeValue}) Object.values(element.attributes).forEach(attrib => { info[attrib.nodeName.replace(/-/g, "_")] = attrib.nodeValue })
return info return info
}) })
} }