Skip to content

Commit

Permalink
Fix keys in table cells, add fallback for kind
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslaw Szwajkowski <[email protected]>
  • Loading branch information
rszwajko committed Jun 20, 2024
1 parent 9129968 commit 9f921e8
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions client/src/app/pages/tasks/tasks-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export const TasksPage: React.FC = () => {
id,
application,
kind,
addon,
state,
priority = 0,
policy,
Expand All @@ -215,7 +216,7 @@ export const TasksPage: React.FC = () => {
}: Task) => ({
id,
application: application.name,
kind,
kind: kind ?? addon,
state: (
<IconWithLabel icon={taskStateToIcon(state)} label={state ?? "No task"} />
),
Expand Down Expand Up @@ -301,12 +302,19 @@ export const TasksPage: React.FC = () => {
>
{columnState.columns
.filter(({ id }) => getColumnVisibility(id))
.map(({ id }) => (
<Td key={id} {...getTdProps({ columnKey: id })}>
{cells[id]}
.map(({ id: columnKey }) => (
<Td
key={`${columnKey}_${task.id}`}
{...getTdProps({ columnKey })}
>
{cells[columnKey]}
</Td>
))}
<Td isActionCell id="row-actions">
<Td
key={`row-actions-${task.id}`}
isActionCell
id={`row-actions-${task.id}`}
>
<ActionsColumn
isDisabled={[
"Succeeded",
Expand Down

0 comments on commit 9f921e8

Please sign in to comment.