mirror of
https://github.com/gosticks/react-table.git
synced 2026-10-06 15:57:04 +00:00
fix: fix path getters, better plugin hook integration, renaming things
This commit is contained in:
@@ -73,7 +73,7 @@ function Table({ columns, data }) {
|
||||
{column.canGroupBy ? (
|
||||
// If the column can be grouped, let's add a toggle
|
||||
<span {...column.getGroupByToggleProps()}>
|
||||
{column.grouped ? '🛑' : '👊'}
|
||||
{column.isGrouped ? '🛑' : '👊'}
|
||||
</span>
|
||||
) : null}
|
||||
{column.render('Header')}
|
||||
@@ -90,7 +90,7 @@ function Table({ columns, data }) {
|
||||
{row.cells.map(cell => {
|
||||
return (
|
||||
<td {...cell.getCellProps()}>
|
||||
{cell.grouped ? (
|
||||
{cell.isGrouped ? (
|
||||
<>
|
||||
<span
|
||||
style={{
|
||||
@@ -102,9 +102,9 @@ function Table({ columns, data }) {
|
||||
</span>
|
||||
{cell.render('Cell')} ({row.subRows.length})
|
||||
</>
|
||||
) : cell.aggregated ? (
|
||||
) : cell.isAggregated ? (
|
||||
cell.render('Aggregated')
|
||||
) : cell.repeatedValue ? null : (
|
||||
) : cell.isRepeatedValue ? null : (
|
||||
cell.render('Cell')
|
||||
)}
|
||||
</td>
|
||||
|
||||
@@ -120,7 +120,7 @@ function App() {
|
||||
{
|
||||
id: 'selectedStatus',
|
||||
Cell: ({ row }) => (
|
||||
<div>{row.selected ? 'Selected' : 'Not Selected'}</div>
|
||||
<div>{row.isSelected ? 'Selected' : 'Not Selected'}</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ 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