AllenFang / AllenFang/react-bootstrap-table
Getting error while refreshing react-bootstrap-table using same data set
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 761
- PR merge metrics
- No merged PRs in 30d
Description
Below is my code snippet:
import React, {Component} from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
import { Table } from 'reactstrap';
class AccountSearchResultPage extends Component {
onRowClick(row) {
console.log('selected row is :' + row.accountNumber);
var acctNumber = row.accountNumber;
this.props.setSelectedAccount(acctNumber);
};
render() {
const selectRowProp = {
mode: 'radio',
clickToSelect: true,
bgColor: '#fefefe',
onSelect: this.onRowClick.bind(this)
};
const options = {
page: 0, // which page you want to show as default
sizePerPageList: [ {
text: '5', value: 5
}, {
text: '10', value: 10
}, {
text: 'All', value: this.props.productList.length
} ], // you can change the dropdown list for size per page
sizePerPage: 3, // which size per page you want to locate as default
pageStartIndex: 0, // where to start counting the pages
paginationSize: 3, // the pagination bar size.
prePage: 'Prev', // Previous page button text
nextPage: 'Next', // Next page button text
firstPage: 'First', // First page button text
lastPage: 'Last', // Last page button text
paginationShowsTotal: 3, // Accept bool or function
hideSizePerPage: true
};
return (
Account Number
Primary Name
SSN/Tax ID
State
Zip Code
Account LookUp
);
}
}
export default AccountSearchResultPage;
First time when my component is render that time it shows data ({this.props.productList} ) on table. But if i try to refresh this component again then i am getting error
Contributor guide
Assessment
This issue has not been assessed yet.