React-bootstrap-table2: Expand management

Created on 6 Feb 2019  路  3Comments  路  Source: react-bootstrap-table/react-bootstrap-table2

I have a problem when set default expanded row.
Expanded array option doesn't work.

This the option variable that I set.
const expandRow = {
renderer: this.expandRenderer,
expanded: this.state.expanding,
showExpandColumn: true,
expandColumnRenderer: this.expandColumnRenderer,
};

Most helpful comment

In my case, I make a mistake. Expanded value must be value that used as key.

For example

const id = [ 'a','b','c']
<BootstrapTable keyField="id" data={nodeInterface} columns={columns} expandRow={expandRow} />

so expanded value must be

expanded: [a,b]

not number like 1,3

All 3 comments

HI, @primakashi I am also facing same issue default rows mention in the array for expanded property not working, i also check the spell and also pass something like that :
const expandRow = {
renderer: this.expandRenderer,
expanded: [1.3],
showExpandColumn: true,
expandColumnRenderer: this.expandColumnRenderer,
};
Can you explain, how your issue was fixed?

In my case, I make a mistake. Expanded value must be value that used as key.

For example

const id = [ 'a','b','c']
<BootstrapTable keyField="id" data={nodeInterface} columns={columns} expandRow={expandRow} />

so expanded value must be

expanded: [a,b]

not number like 1,3

Let me check this maybe this is also the case with me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eylonronen picture eylonronen  路  3Comments

bogannathan picture bogannathan  路  4Comments

nskiro picture nskiro  路  4Comments

thevangelist picture thevangelist  路  4Comments

ethannkschneider picture ethannkschneider  路  3Comments