Skip to content

EuiInMemoryTable - request ability to set pageIndex and pageSize externally #3982

@alvarezmelissa87

Description

@alvarezmelissa87

We've run into an issue in ML where the EuiInMemory table always gets reset to page index 0 regardless of what props are passed in. As a workaround, we've had to use the EuiBasicTable with the EuiSearchBar and have done our own handling of the search, sorting, and pagination functionality. This results in a lot of extra code the aim of which is to be able to pass in what page index the table should be on when it renders. We've had to add this in 3 places in ML as well as Transforms.

E.g. in the anomaly detection jobs list https://github.com/elastic/kibana/blob/master/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list/jobs_list.js#L77

It's challenging to maintain a stable items reference as, in ML and Transforms, we do want to keep the jobs/transforms list as up-to-date as possible and we re-fetch the table items frequently resulting in pagination being reset when the contents change at all.

It feels like an indicator that maybe it would be more efficient to have this functionality built into the EuiInMemoryTable

Docs example use case:

The In-memory table with search and external state example in the docs has an Online/Offline column. In the case where you're re-fetching the table items and nothing changes but the Online/Offline property - you'd want to be able to update that property and maintain the current page index/size since the items themselves aren't changing.

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