Skip to content

Search bar clear error when changing number of results per page #1398

Open
@pastinepolenta

Description

@pastinepolenta

Describe the bug
An error happens when clearing the search bar after changing the number of results per page.

To Reproduce
Steps to reproduce the behavior:

  1. Standard table with custom search component and pagination
  2. Search something so that the search returns ZERO results
  3. Change the number of results per page on the pagination
  4. Clear the search with the "clear button" (which calls the onClear() prop)
  5. Error: TypeError Cannot read property 'id' of undefined

codesandbox
https://codesandbox.io/s/react-bootstrap-table-next-custom-search-with-clear-button-ugd2v

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions