Skip to content

Commit

Permalink
Sobenna/click judging (#464)
Browse files Browse the repository at this point in the history
* removed sticky header parameter

* added row clicking in addition to button clicking. only row is a little unintuitive?

* Run Prettier

* Fix yarn.lock

---------

Co-authored-by: SobennaStory <[email protected]>
Co-authored-by: Isaac  Liu <[email protected]>
  • Loading branch information
3 people authored Apr 19, 2024
1 parent 57e7c75 commit 594b594
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/judges/schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ export function JudgeSchedule({ data, cutoffIndex, handleChange }: ScheduleProps
};
});

const handleRowClick = (record: any) => {
handleChange(record.teamId);
};

return (
<Table
locale={{
Expand All @@ -276,7 +280,6 @@ export function JudgeSchedule({ data, cutoffIndex, handleChange }: ScheduleProps
dataSource={dataSource}
columns={columns}
pagination={false}
sticky
bordered
scroll={{ x: true }}
summary={_ => (
Expand All @@ -289,6 +292,9 @@ export function JudgeSchedule({ data, cutoffIndex, handleChange }: ScheduleProps
</Table.Summary.Row>
</Table.Summary>
)}
onRow={record => ({
onClick: () => handleRowClick(record),
})}
/>
);
}

0 comments on commit 594b594

Please sign in to comment.