Show root-level models at the top

This commit is contained in:
cmdr2 2023-02-24 18:54:47 +05:30
parent 45a2c9f7ef
commit 37b47e7f05

View File

@ -587,7 +587,8 @@ class ModelDropdown
listElement.appendChild(this.createElement('li', undefined, ['model-folder'], folderName.substring(1), 'fa-solid fa-folder-open')) listElement.appendChild(this.createElement('li', undefined, ['model-folder'], folderName.substring(1), 'fa-solid fa-folder-open'))
} }
const allModelElements = isRootFolder ? [...folderElements, ...modelElements] : [...modelElements, ...folderElements] // const allModelElements = isRootFolder ? [...folderElements, ...modelElements] : [...modelElements, ...folderElements]
const allModelElements = [...modelElements, ...folderElements]
allModelElements.forEach(e => listElement.appendChild(e)) allModelElements.forEach(e => listElement.appendChild(e))
return listElement return listElement
} }