From 9b62e4d5138ba203630d101f65e0a2820ab3afae Mon Sep 17 00:00:00 2001 From: Igor Zaytsev Date: Thu, 4 Apr 2019 12:51:30 -0400 Subject: [PATCH 1/2] Passing correct pagination prop names for EuiInMemoryTable --- .../monitoring/public/components/table/eui_table.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/x-pack/plugins/monitoring/public/components/table/eui_table.js b/x-pack/plugins/monitoring/public/components/table/eui_table.js index 8e214126cca6b..5dc9897159b9f 100644 --- a/x-pack/plugins/monitoring/public/components/table/eui_table.js +++ b/x-pack/plugins/monitoring/public/components/table/eui_table.js @@ -33,6 +33,14 @@ export class EuiMonitoringTable extends React.PureComponent { return column; }); + //TODO: Remove this once: https://github.com/elastic/eui/issues/1274 is implemented + if (props.pagination) { + props.pagination = { + pageIndex: props.pagination.index || 0, + pageSize: props.pagination.size || props.pagination.initialPageSize || 20, + }; + } + return (
Date: Thu, 4 Apr 2019 20:38:31 -0400 Subject: [PATCH 2/2] Implemented a simpler solution --- .../monitoring/public/components/table/eui_table.js | 8 -------- .../monitoring/public/views/base_eui_table_controller.js | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/x-pack/plugins/monitoring/public/components/table/eui_table.js b/x-pack/plugins/monitoring/public/components/table/eui_table.js index 5dc9897159b9f..8e214126cca6b 100644 --- a/x-pack/plugins/monitoring/public/components/table/eui_table.js +++ b/x-pack/plugins/monitoring/public/components/table/eui_table.js @@ -33,14 +33,6 @@ export class EuiMonitoringTable extends React.PureComponent { return column; }); - //TODO: Remove this once: https://github.com/elastic/eui/issues/1274 is implemented - if (props.pagination) { - props.pagination = { - pageIndex: props.pagination.index || 0, - pageSize: props.pagination.size || props.pagination.initialPageSize || 20, - }; - } - return (
{ setLocalStorageData(storage, { - page, + page: { pageIndex: page.index || 0, pageSize: page.size || 20 }, sort: { sort }