mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-14 23:53:14 +00:00
Sort unknown components to the bottom
This commit is contained in:
@@ -40,6 +40,10 @@ export class EntityInspectorElement extends LitElement {
|
||||
.sort((a, b) => {
|
||||
const ordA = COMPONENT_SORT_ORDER.indexOf(a.name);
|
||||
const ordB = COMPONENT_SORT_ORDER.indexOf(b.name);
|
||||
|
||||
if (ordA === -1) return 1;
|
||||
if (ordB === -1) return -1;
|
||||
|
||||
return ordA - ordB;
|
||||
})
|
||||
.map(({ name, value }) => {
|
||||
|
||||
Reference in New Issue
Block a user