Feature: PadRowComponent prop

This commit is contained in:
Tanner Linsley
2017-06-19 11:34:21 -06:00
parent fdb3e77b00
commit 2e3743b75f
4 changed files with 10 additions and 2 deletions
+4
View File
@@ -1,3 +1,7 @@
## 6.4.0
##### New Features
- `PadRowComponent` - the content rendered inside of a padding row. Defaults to a react component that renders ` `
## 6.3.0
##### New Features
- `defaultSortDesc` - allows you to set the default sorting direction for all columns to descending.
+1
View File
@@ -195,6 +195,7 @@ These are all of the available props (and their default values) for the main `<R
// returning 0, undefined or any falsey value will use subsequent sorts or the index as a tiebreaker
return 0
},
PadRowComponent: () => <span>&nbsp;</span>, // the content rendered inside of a padding row
// Controlled State Overrides (see Fully Controlled Component section)
page: undefined,
+1
View File
@@ -231,4 +231,5 @@ export default {
</div>,
NoDataComponent: _.makeTemplateComponent('rt-noData'),
ResizerComponent: _.makeTemplateComponent('rt-resizer'),
PadRowComponent: () => <span>&nbsp;</span>,
}
+4 -2
View File
@@ -118,6 +118,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) {
PivotComponent,
AggregatedComponent,
FilterComponent,
PadRowComponent,
// Data model
resolvedData,
allVisibleColumns,
@@ -159,7 +160,6 @@ export default class ReactTable extends Methods(Lifecycle(Component)) {
index
]
}
;[pageRows] = recurseRowsViewIndex(pageRows)
const canPrevious = page > 0
@@ -804,7 +804,9 @@ export default class ReactTable extends Methods(Lifecycle(Component)) {
maxWidth: `${maxWidth}px`
}}
{...tdProps.rest}
/>
>
{_.normalizeComponent(PadRowComponent)}
</TdComponent>
)
}