-
Notifications
You must be signed in to change notification settings - Fork 432
Closed
Description
Hi, I need to animate expanding row by slideDown animation. Is there any way to do it?
import React, { Component } from 'react';
import BootstrapTable from 'react-bootstrap-table-next';
import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css';
const products = [
{ 'id': 'asd1', 'name': 'asd1', 'price': '1000' },
{ 'id': 'asdass', 'name': 'asd1', 'price': '1000' },
];
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'price',
text: 'Product Price'
}];
const expandRow = {
renderer: row => (
<div>
<p>{ `This Expand row is belong to rowKey ${row.id}` }</p>
<p>{row.name}</p>
<p>expandRow.renderer callback will pass the origin row object to you</p>
</div>
),
onlyOneExpanding: true
}
export default class Table extends Component {
render() {
return(
<BootstrapTable
keyField='id'
data={ products }
columns={ columns }
expandRow={ expandRow }
/>
)
}
}
yee379