Sort unknown components to the bottom

This commit is contained in:
Danny McGee
2024-03-20 21:00:47 -04:00
committed by Brandon Thomas
parent cd19b3e593
commit c64a2e9d29
@@ -40,6 +40,10 @@ export class EntityInspectorElement extends LitElement {
.sort((a, b) => { .sort((a, b) => {
const ordA = COMPONENT_SORT_ORDER.indexOf(a.name); const ordA = COMPONENT_SORT_ORDER.indexOf(a.name);
const ordB = COMPONENT_SORT_ORDER.indexOf(b.name); const ordB = COMPONENT_SORT_ORDER.indexOf(b.name);
if (ordA === -1) return 1;
if (ordB === -1) return -1;
return ordA - ordB; return ordA - ordB;
}) })
.map(({ name, value }) => { .map(({ name, value }) => {