AllenFang / react-bootstrap-table

A Bootstrap table built with React.js
https://allenfang.github.io/react-bootstrap-table/
MIT License
2.24k stars 782 forks source link

Remote Pagination and Local Sort #2040

Open spal0002 opened 5 years ago

spal0002 commented 5 years ago

I am using react-bootstrap-table ^4.3.1

I want remote pagination so i set to remote={true} but i want local sorting.

<BootstrapTable striped options={this.state} selectRow={this.props.selectRow} data={this.props.deviceData} remote={true} pagination={true} fetchInfo={{ dataTotalSize: this.props.devicesCount }} hover selectRow={selectRowProp} >

                {tableColumnsData}
                <TableHeaderColumn dataField="id" dataFormat={actionsFormatter}>Actions</TableHeaderColumn>
            </BootstrapTable>

Can you please help..

kishorebovi commented 5 years ago

Any update on this issue.?

gyerzh commented 5 years ago

Try this

function remote(remoteObj) { // it means that only pagination you will handle by your own remoteObj.pagination = true return remoteObj }

<BootstrapTable striped options={this.state} selectRow={this.props.selectRow} data={this.props.deviceData} remote={remote} pagination={true} fetchInfo={{ dataTotalSize: this.props.devicesCount }} hover selectRow={selectRowProp} >

kishorebovi commented 5 years ago

@gyerzh Thank you. It worked.