From f1a1f48c0f32da2ec3ddff01d30295d4994d62e2 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Thu, 31 Mar 2022 08:30:31 -0700 Subject: [PATCH] OutlinePanel: Display object list in A-Z order (#115) --- .../OutlinePanel/ObjectsList/ObjectsList.tsx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/theatre/studio/src/panels/OutlinePanel/ObjectsList/ObjectsList.tsx b/theatre/studio/src/panels/OutlinePanel/ObjectsList/ObjectsList.tsx index 6b9a17b..02cb7bb 100644 --- a/theatre/studio/src/panels/OutlinePanel/ObjectsList/ObjectsList.tsx +++ b/theatre/studio/src/panels/OutlinePanel/ObjectsList/ObjectsList.tsx @@ -19,15 +19,17 @@ const ObjectsList: React.FC<{ return ( <> - {objectsEntries.map(([objectPath, object]) => { - return ( - - ) - })} + {objectsEntries + .sort(([pathA], [pathB]) => (pathA > pathB ? 1 : -1)) + .map(([objectPath, object]) => { + return ( + + ) + })} ) }, [sheet, depth])