aliexpress-price-tracker/web/filters_checkboxes.js

22 lines
763 B
JavaScript
Raw Normal View History

2024-02-21 01:17:15 +01:00
function filters_checkboxes() {
fetch_list().then(function(data){
{
const node = document.getElementById("filters_checkboxes");
while (node.firstChild) {
node.removeChild(node.lastChild);
}
}
const node = d3.select("#filters_checkboxes");
for (const itemlist of data) {
var label = node.append("label");
var input = label.append("input")
.attr("type", "checkbox")
.attr("class", "checkbox-filters")
.attr("id", `checkbox-${itemlist.uuid}`);
label.append("span")
.text(`${itemlist.name}`);
node.append("br");
}
})
}