Skip to content

Commit

Permalink
fix: status grid UI was not re-rendering on model change
Browse files Browse the repository at this point in the history
  • Loading branch information
starpit committed Apr 10, 2023
1 parent 39cb8e2 commit fe4d189
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ export default class Dashboard extends React.PureComponent<Props, State> {
workers: !isWorkersUpdate(model)
? curState?.workers
: !curState?.workers
? [model.workers]
: [...curState.workers.slice(0, gridIdx), model.workers, ...curState.workers.slice(gridIdx + 1)],
? [model.workers] // i think this is wrong. don't we need to preserve indexing?
: [...curState.workers.slice(0, gridIdx), model.workers.slice(), ...curState.workers.slice(gridIdx + 1)],
// ^^^^^^^ ugh, we could optimize this to check for changes
})),
0
)
Expand Down

0 comments on commit fe4d189

Please sign in to comment.