shx-3d-render

main
Jan Umbach 2024-06-22 13:47:16 +02:00
parent 7672bef26f
commit 3e405c7c92
1 changed files with 4 additions and 2 deletions

View File

@ -297,10 +297,12 @@
`; `;
// Convert object to Map // Convert object to Map
let optionsMap = new Map(Object.entries(options)); let optionsKeys = Object.keys(options);
// Iterate over the Map // Iterate over the Map
for (let [color, value] of optionsMap) { for (let i = 0; i < optionsKeys.length; i++) {
let color = optionsKeys[i];
console.log(color); console.log(color);
html += ` html += `
<input type="radio" id="${inputID}-${color}" form="product-form-${section_id}" name="properties[${inputName}]" value="${options[color].name} #${color}" ${inputVal === color ? 'checked' : ''}> <input type="radio" id="${inputID}-${color}" form="product-form-${section_id}" name="properties[${inputName}]" value="${options[color].name} #${color}" ${inputVal === color ? 'checked' : ''}>