Anupam Maurya
Anupam Maurya

Reputation: 2201

Invalid prop `selectRow` of type `string` supplied to `BootstrapTable`, expected `object`

I am using react-bootstrap-table, and I am passing proper column and data to the table and it working fine with me.

But I am get in the console warning as

Failed prop type: Invalid prop `selectRow` of type `string` supplied to `BootstrapTable`, expected `object`.

Here is my Code:

<Table columns={columns} data={data}
    actions={action} cellEdit={{ mode: 'click' }} />

b

Trying to remove to the warning from browser console.

Thanks.

Upvotes: 0

Views: 465

Answers (1)

Anupam Maurya
Anupam Maurya

Reputation: 2201

Yes it needed selectRow as props

const selectRow = {
      style: { background: '#f2f2f2' }
    }

<Table columns={columns} data={data} selectRow={selectRow}
    actions={action} cellEdit={{ mode: 'click' }} />

Upvotes: 1

Related Questions