File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
web/src/components/ReactTable Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { Table } from 'reactstrap' ;
3
3
import { useTable , useSortBy } from 'react-table' ;
4
+ import { FaArrowCircleUp , FaArrowCircleDown } from 'react-icons/fa' ;
4
5
5
6
function ReactTable ( { columns, data } ) {
6
7
const {
@@ -18,15 +19,24 @@ function ReactTable({ columns, data }) {
18
19
) ;
19
20
20
21
return (
21
- < Table align = "center" { ...getTableProps ( ) } >
22
+ < Table align = "center" striped hover { ...getTableProps ( ) } >
22
23
< thead >
23
24
{ headerGroups . map ( headerGroup => (
24
25
< tr { ...headerGroup . getHeaderGroupProps ( ) } >
25
26
{ headerGroup . headers . map ( column => (
26
27
< th { ...column . getHeaderProps ( column . getSortByToggleProps ( ) ) } >
27
28
{ column . render ( 'Header' ) }
28
29
< span >
29
- { column . isSorted ? ( column . isSortedDesc ? ' 🔽' : ' 🔼' ) : '' }
30
+ { ' ' }
31
+ { column . isSorted ? (
32
+ column . isSortedDesc ? (
33
+ < FaArrowCircleDown />
34
+ ) : (
35
+ < FaArrowCircleUp />
36
+ )
37
+ ) : (
38
+ ''
39
+ ) }
30
40
</ span >
31
41
</ th >
32
42
) ) }
You can’t perform that action at this time.
0 commit comments