mirror of
https://github.com/gosticks/react-table.git
synced 2026-06-29 01:20:02 +00:00
fix: fix path getters, better plugin hook integration, renaming things
This commit is contained in:
@@ -37,7 +37,7 @@ function MyTable() {
|
||||
+ <th {...column.getHeaderProps(column.getSortByToggleProps())}>
|
||||
{column.render('Header')}
|
||||
+ <span>
|
||||
+ {column.sorted ? (column.sortedDesc ? ' 🔽' : ' 🔼') : ''}
|
||||
+ {column.isSorted ? (column.isSortedDesc ? ' 🔽' : ' 🔼') : ''}
|
||||
+ </span>
|
||||
</th>
|
||||
))}
|
||||
|
||||
@@ -65,7 +65,11 @@ function Table({ columns, data }) {
|
||||
{column.render('Header')}
|
||||
{/* Add a sort direction indicator */}
|
||||
<span>
|
||||
{column.sorted ? (column.sortedDesc ? ' 🔽' : ' 🔼') : ''}
|
||||
{column.isSorted
|
||||
? column.isSortedDesc
|
||||
? ' 🔽'
|
||||
: ' 🔼'
|
||||
: ''}
|
||||
</span>
|
||||
</th>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user