Skip to content

Commit 555584e

Browse files
committed
Hotfix to add row numbers to table
1 parent 114259b commit 555584e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

apps/site/src/app/admin/scores/Scores.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@ function Scores() {
107107
[applicantList],
108108
);
109109

110-
const sorted = sortApplicantsByNormalizedScore(filteredApplicants);
110+
const sorted = sortApplicantsByNormalizedScore(filteredApplicants).map(
111+
(item, index) => ({
112+
...item,
113+
rowIndex: index + 1,
114+
}),
115+
);
111116

112117
const handleClick = () => {
113118
axios
@@ -154,6 +159,12 @@ function Scores() {
154159
<Table
155160
loading={loading}
156161
columnDefinitions={[
162+
{
163+
id: "index",
164+
header: "#",
165+
cell: (item) => item.rowIndex,
166+
width: 60,
167+
},
157168
{
158169
id: "name",
159170
header: "Name",

0 commit comments

Comments
 (0)