From d9822e04d4e67f9ae01e76c57517b0d695f4be3c Mon Sep 17 00:00:00 2001 From: Max Fitton Date: Fri, 7 Aug 2020 20:46:06 -0700 Subject: [PATCH] [Dashboard] Switch to using the correct actor ID as a react key for each actor entry in the actors list in the logical view. This fixes a bug where duplicate actor entries were being rendered in the UI (#9991) Co-authored-by: Max Fitton --- .../client/src/pages/dashboard/logical-view/Actors.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ray/dashboard/client/src/pages/dashboard/logical-view/Actors.tsx b/python/ray/dashboard/client/src/pages/dashboard/logical-view/Actors.tsx index 20e21673e..ecd2d63c7 100644 --- a/python/ray/dashboard/client/src/pages/dashboard/logical-view/Actors.tsx +++ b/python/ray/dashboard/client/src/pages/dashboard/logical-view/Actors.tsx @@ -8,8 +8,8 @@ type ActorProps = { const Actors = (props: ActorProps) => { const { actors } = props; - const actorChildren = Object.values(actors) - .sort((actor1, actor2) => { + const actorChildren = Object.entries(actors) + .sort(([, actor1], [, actor2]) => { if ( actor1.state === ActorState.Dead && actor2.state === ActorState.Dead @@ -21,7 +21,7 @@ const Actors = (props: ActorProps) => { return 1; } }) - .map((actor) => ); + .map(([aid, actor]) => ); return {actorChildren}; };