Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nafeu/0e6b13ec210c2410dce8d45ca4fca997 to your computer and use it in GitHub Desktop.
Save nafeu/0e6b13ec210c2410dce8d45ca4fca997 to your computer and use it in GitHub Desktop.
{headerGroups.map(headerGroup => (
<tr {...headerGroup.getHeaderGroupProps()}>
{headerGroup.headers.map(column => (
<th {...column.getHeaderProps(column.getSortByToggleProps())}>
{column.render('Header')}
<span>
{column.isSorted
? column.isSortedDesc
? ' ⬇️'
: ' ⬆️'
: ' ↕️'}
</span>
</th>
))}
</tr>
))}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment