MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / updateMetadataTabs

Function updateMetadataTabs

renderer.js:6760–6779  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6758 // Repopulate all parent model dropdowns to ensure consistency
6759 await populateParentModelFilter(); // Filter dropdown
6760 if (sourceDropdownId === 'model-parent') {
6761 await populateParentModelDropdown(newParentName, 'model-parent');
6762 } else if (sourceDropdownId === 'multi-parent') {
6763 await populateParentModelDropdown(newParentName, 'multi-parent');
6764 } else if (sourceDropdownId === 'parent-select') {
6765 // Filter dropdown - already repopulated by populateParentModelFilter
6766 const parentSelect = document.getElementById('parent-select');
6767 if (parentSelect) {
6768 parentSelect.value = newParentName;
6769 }
6770 } else {
6771 // Fallback: manually add to the source dropdown if it's not one of the standard ones
6772 const parentSelect = document.getElementById(sourceDropdownId);
6773 if (parentSelect) {
6774 const optionExists = Array.from(parentSelect.options).some(opt => opt.value === newParentName);
6775 if (!optionExists) {
6776 const option = document.createElement('option');
6777 option.value = newParentName;
6778 option.textContent = newParentName;
6779 parentSelect.appendChild(option);
6780 }
6781 parentSelect.value = newParentName;
6782 }

Callers 2

renderer.jsFile · 0.85
initializeMetadataTabsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected