Skip to content

Commit

Permalink
Use step name and task id to identify active task (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
obgibson authored Mar 5, 2024
1 parent c1defd2 commit 67589f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/pages/Task/components/TaskList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Props = {
rows: Row[];
rowDataDispatch: (action: RowDataAction) => void;
taskStatus: AsyncStatus;
activeTaskId: string;
activeTask: string;
results: SearchResultModel;
grouped: boolean;
paramsString?: string;
Expand All @@ -31,7 +31,7 @@ const TaskList: React.FC<Props> = ({
rows,
rowDataDispatch,
taskStatus,
activeTaskId,
activeTask,
results,
grouped,
paramsString,
Expand Down Expand Up @@ -76,12 +76,12 @@ const TaskList: React.FC<Props> = ({
? () => (item.data ? rowDataDispatch({ type: 'toggle', id: item.data.step_name }) : null)
: undefined
}
active={item.type === 'task' && getTaskId(item.data[0]) === activeTaskId}
active={item.type === 'task' && item.data[0].step_name + '/' + getTaskId(item.data[0]) === activeTask}
isOpen={item.type === 'step' && item.rowObject.isOpen}
/>
);
},
[activeTaskId, grouped, paramsString, rowDataDispatch, rows],
[activeTask, grouped, paramsString, rowDataDispatch, rows],
);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Task/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ const Task: React.FC<TaskViewProps> = ({
rows={rows}
rowDataDispatch={rowDataDispatch}
taskStatus={taskStatus}
activeTaskId={taskId}
activeTask={stepName + '/' + taskId}
results={searchField.results}
grouped={settings.group}
paramsString={paramsString}
Expand Down

0 comments on commit 67589f3

Please sign in to comment.