How can I get sum values?
See original GitHub issueI read related issue (https://github.com/AllenFang/react-bootstrap-table/issues/514) and try applied. but it doesn’t work. Please have a look and tell me what I missing.
handleSearchChange (searchText, colInfos, multiColumnSearch) {
this.refs.getTableDataIgnorePaging(); //'this' is undefined and I have no idea, how do I get current cell values
}
render(){
const options = {
onSearchChange: this.handleSearchChange.bind(this),
onFilterChange : this.handleSearchChange.bind(this)
};
return (
<div>
<h2>Daily Report</h2>
<div className="data_table">
<BootstrapTable data={this.state.data} striped={true} hover={true} trClassName="tr-string" search={true} ref='table' options={options}>
<TableHeaderColumn isKey={true} dataField="id" className="no" hidden={true} >No.</TableHeaderColumn>
<TableHeaderColumn dataField="Campaign Name" dataSort={true} className="campaign_header" columnClassName="campaign_col" filter={{type: "TextFilter"}}>Campaign Name</TableHeaderColumn>
...
</BootstrapTable>
</div>
Total Sent : {this.state.sum}
</div>
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
SUMIF function - Microsoft Support
You use the SUMIF function to sum the values in a range that meet criteria that you ... To sum cells based on...
Read more >Excel Sum Function Examples
Select the cell in which you want to see the total · Type an equal sign (=) to start the formula · Type:...
Read more >How to Sum Values in Excel Automatically or Manually
1. Click the cell you want the sum to appear in and click "=." 2. Type a number or click a cell that...
Read more >How to sum values by group in Excel? - ExtendOffice
Select next cell to the data range, type this =IF(A2=A1,"",SUMIF(A:A,A2,B:B)), (A2 is the relative cell you want to sum based on, A1 is...
Read more >How to sum a column in Excel - 5 easy ways - Ablebits
Use the SUM function to total a column · Using the SUM function, you can also automatically total new values in a column...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
AllenFang, ok good! I did a real hack to make it work if others are interested:
I put this in render():
So in afterSearch:
Then somewhere in the react class return below the boostrap table:
Thanks, @AllenFang I used handleAfterSearch. It works. Thanks.