mirror of
https://github.com/gosticks/react-table.git
synced 2026-06-29 01:20:02 +00:00
Add defaultExpanded prop
This commit is contained in:
@@ -22,6 +22,7 @@ export default {
|
||||
defaultSorting: [],
|
||||
showFilters: false,
|
||||
defaultFilters: [],
|
||||
defaultExpanded: {},
|
||||
defaultFilterMethod: (filter, row, column) => {
|
||||
const id = filter.pivotId || filter.id
|
||||
return row[id] !== undefined ? String(row[id]).startsWith(filter.value) : true
|
||||
|
||||
@@ -33,9 +33,9 @@ export default class ReactTable extends Methods(Lifecycle(Component)) {
|
||||
|
||||
this.state = {
|
||||
page: 0,
|
||||
pageSize: props.defaultPageSize || 10,
|
||||
pageSize: props.defaultPageSize,
|
||||
sorting: props.defaultSorting,
|
||||
expandedRows: {},
|
||||
expandedRows: props.defaultExpanded,
|
||||
filters: props.defaultFilters,
|
||||
resizing: props.defaultResizing,
|
||||
currentlyResizing: false,
|
||||
|
||||
Reference in New Issue
Block a user