Skip to content

Commit

Permalink
fix(ui): Optimize selected job
Browse files Browse the repository at this point in the history
  • Loading branch information
pando85 committed Jan 26, 2024
1 parent e0a88b7 commit 615b474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/web/ui/src/JobTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ const JobTable: React.FC<JobTableProps> = ({ token, setShowJobTable }) => {
}
};

const handleRowClick = (jobId: string) => {
setSelectedJob(jobs.find((job) => job.id === jobId) || null);
const handleRowClick = (job: Job) => {
setSelectedJob(job);
};

const handleNameFilterChange = (event: React.ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -367,7 +367,7 @@ const JobTable: React.FC<JobTableProps> = ({ token, setShowJobTable }) => {
{filteredJobs.map((job) => (
<TableRow
key={job.id}
onClick={() => handleRowClick(job.id)}
onClick={() => handleRowClick(job)}
className="table-row"
>
<TableCell>
Expand Down

0 comments on commit 615b474

Please sign in to comment.