Created
March 1, 2021 21:47
-
-
Save nafeu/0e6b13ec210c2410dce8d45ca4fca997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{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