Skip to content

Commit fe4d189

Browse files
committed
fix: status grid UI was not re-rendering on model change
1 parent 39cb8e2 commit fe4d189

File tree

1 file changed

+3
-2
lines changed
  • plugins/plugin-codeflare-dashboard/src/components/Dashboard

1 file changed

+3
-2
lines changed

Diff for: plugins/plugin-codeflare-dashboard/src/components/Dashboard/index.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ export default class Dashboard extends React.PureComponent<Props, State> {
110110
workers: !isWorkersUpdate(model)
111111
? curState?.workers
112112
: !curState?.workers
113-
? [model.workers]
114-
: [...curState.workers.slice(0, gridIdx), model.workers, ...curState.workers.slice(gridIdx + 1)],
113+
? [model.workers] // i think this is wrong. don't we need to preserve indexing?
114+
: [...curState.workers.slice(0, gridIdx), model.workers.slice(), ...curState.workers.slice(gridIdx + 1)],
115+
// ^^^^^^^ ugh, we could optimize this to check for changes
115116
})),
116117
0
117118
)

0 commit comments

Comments
 (0)