OutlinePanel: Display object list in A-Z order (#115)
This commit is contained in:
parent
2bf081478f
commit
f1a1f48c0f
1 changed files with 11 additions and 9 deletions
|
@ -19,15 +19,17 @@ const ObjectsList: React.FC<{
|
|||
|
||||
return (
|
||||
<>
|
||||
{objectsEntries.map(([objectPath, object]) => {
|
||||
return (
|
||||
<ObjectItem
|
||||
depth={depth}
|
||||
key={'objectPath(' + objectPath + ')'}
|
||||
sheetObject={object}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
{objectsEntries
|
||||
.sort(([pathA], [pathB]) => (pathA > pathB ? 1 : -1))
|
||||
.map(([objectPath, object]) => {
|
||||
return (
|
||||
<ObjectItem
|
||||
depth={depth}
|
||||
key={'objectPath(' + objectPath + ')'}
|
||||
sheetObject={object}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</>
|
||||
)
|
||||
}, [sheet, depth])
|
||||
|
|
Loading…
Reference in a new issue