fix: fix path getters, better plugin hook integration, renaming things

This commit is contained in:
tannerlinsley
2019-08-19 16:38:42 -06:00
parent 93524d0701
commit f59efde6fe
15 changed files with 208 additions and 112 deletions
+4 -4
View File
@@ -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>
+1 -1
View File
@@ -120,7 +120,7 @@ function App() {
{
id: 'selectedStatus',
Cell: ({ row }) => (
<div>{row.selected ? 'Selected' : 'Not Selected'}</div>
<div>{row.isSelected ? 'Selected' : 'Not Selected'}</div>
),
},
{
+1 -1
View File
@@ -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>
))}