OutlinePanel: Display object list in A-Z order (#115)

This commit is contained in:
Don McCurdy 2022-03-31 08:30:31 -07:00 committed by GitHub
parent 2bf081478f
commit f1a1f48c0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,15 +19,17 @@ const ObjectsList: React.FC<{
return ( return (
<> <>
{objectsEntries.map(([objectPath, object]) => { {objectsEntries
return ( .sort(([pathA], [pathB]) => (pathA > pathB ? 1 : -1))
<ObjectItem .map(([objectPath, object]) => {
depth={depth} return (
key={'objectPath(' + objectPath + ')'} <ObjectItem
sheetObject={object} depth={depth}
/> key={'objectPath(' + objectPath + ')'}
) sheetObject={object}
})} />
)
})}
</> </>
) )
}, [sheet, depth]) }, [sheet, depth])