Skip to content

ToolkitProvider and PaginationProvider not working together #740

@ashcorah

Description

@ashcorah

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions