question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ToolkitProvider and PaginationProvider not working together

See original GitHub issue

Is it possible to have a fully custom pagination component with the toolkit provider that provides search capabilities?

How do you pass the props for data through to both modules? Below code shows the two wrapped components. Also I have enabled remote for Pagination, does PaginationProvider currently support remote?

    <Row>
          <PaginationProvider
            pagination={paginationFactory({
              custom: true,
              totalSize,
              page,
              sizePerPage,
            })}
            keyField="id"
            columns={columns}
            data={data}
          >
            {
              ({
                paginationProps,
                paginationTableProps,
              }) => (
                <div>
                  <ToolkitProvider
                    bootstrap4
                    search
                    {...paginationTableProps}
                  >
                    {
                      props => (
                        <Col>                     
                          <Row>
                            <SearchBar
                              placeholder="Search customers and invoices..."
                              {...props.searchProps}
                            />
                          </Row>
                          <Row>
                            <BootstrapTable
                              ref={n => this.node = n}
                              noDataIndication="No results!"
                              headerClasses={style.header}
                              rowClasses={style.row}
                              bordered={false}
                              defaultSorted={[{
                                dataField: 'Name',
                                order: 'desc',
                              }]}
                              remote={{
                                filter: true,
                                pagination: true,
                                sort: true,
                              }}
                              selectRow={selectRow}
                              expandRow={expandRow}
                              onTableChange={this.handleTableChange}
                              // pagination={paginationFactory({ page, sizePerPage, totalSize })}
                              {...paginationTableProps}
                              {...props.baseProps}
                            />
                            <PaginationListStandalone
                              {...paginationProps}
                            />
                            <SizePerPageDropdownStandalone
                              {...paginationProps}
                            />
                          </Row>
                        </Col>
                      )
                    }
                  </ToolkitProvider>
                </div>
              )
            }
          </PaginationProvider>
        </Row>

TypeError: _this.props.isRemotePagination is not a function

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
eslynunezcommented, Jan 17, 2019

@AllenFang I am sorry to hear that, I hope you feel better! I came here with the same issue. Is there a work around example?

5reactions
dejongbabacommented, Aug 8, 2019

@AshCorah Please how were you able to combine both the ToolkitProvider and PaginationProvider together. Please, can you show your working example?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReactJS BootstrapTable with pagination does not work with ...
I integrated the Bootstrap ExportCSV ToolkitProvider. It only works if I don't have pagination. <ToolkitProvider keyField="id" data={ products} ...
Read more >
react-bootstrap-table-next - basic example - CodeSandbox
import ToolkitProvider, { Search } from "react-bootstrap-table2-toolkit";. import paginationFactory, {. PaginationProvider,. SizePerPageDropdownStandalone,.
Read more >
Pagination · react-bootstrap-table2 - GitHub Pages
PaginationProvider actually is a wrapper for the consumer of react context so that you are able to get the props from context then...
Read more >
React Bootstrap Table With Searching and Custom Pagination
In this article, we discuss how to use the React Bootstrap Table and add pagination, searching, and sorting.
Read more >
react-bootstrap-table2-paginator-esm - npm
Sometime, you may feel above props is not satisfied with your ... react-bootstrap-table2-paginator have a PaginationProvider which is a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found