[EuiInMemoryTable] Pagination breaks when search.onChange
is configured
#3445
Labels
documentation
Issues or PRs that only affect documentation - will not need changelog entries
stale-issue
stale-issue-closed
To reproduce this problem, configure an
EuiInMemoryTable
with something like this:The bug arises due to the new array being generated each render by the filtering logic.
EuiInMemoryTable
deliberately treats a new array as a trigger for resetting pagination to the first page. This manifests as nonresponsive pagination wheneversearch.onChange
is configured.After discussing this with @chandlerprall we concluded that a reasonable solution would be to document best practices on the example page, which is to cache the filtered rows on state instead of calculating them inside of the render method. Documentation would include things like:
search.onChange
and demonstrate this best practice.The text was updated successfully, but these errors were encountered: