mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 10:33:16 +08:00
[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 <max@semprehealth.com>
This commit is contained in:
@@ -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) => <Actor actor={actor} key={actor.actorId} />);
|
||||
.map(([aid, actor]) => <Actor actor={actor} key={aid} />);
|
||||
return <Fragment>{actorChildren}</Fragment>;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user