Skip to content

Instantly share code, notes, and snippets.

@gpDA
Created September 11, 2019 15:54
Show Gist options
  • Save gpDA/0e0709257ff0002bc27e2c0aa3449bcd to your computer and use it in GitHub Desktop.
Save gpDA/0e0709257ff0002bc27e2c0aa3449bcd to your computer and use it in GitHub Desktop.
return (
<React.Fragment>
<Table>
<thead>
<tr>
<th onClick={() => handleSortClick("studentId")}>
<strong>
studentId
{arrowToggle === -1 && sortType === "uniqueReportTypestudentIdstudentData" ? (
<>&#8595;</>
) : arrowToggle === 1 && sortType === "uniqueReportTypestudentIdstudentData" ? (
<>&#8593;</>
) : null}
</strong>
</th>
</tr>
</thead>
<tbody>
{data.map(ele => {
return (
<tr>
<td>{ele.studentId}</td>
<td>{ele.studentName}</td>
<td>{ele.studentAge}</td>
<td>{ele.studentZipCode}</td>
</tr>
);
})}
</tbody>
</Table>
</React.Fragment>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment