From f0c4cf42b0a18c157e86fb3f4dd5651ee66117df Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Wed, 12 Jun 2019 14:48:19 -0500 Subject: [PATCH] EuiInMemoryTable: maintain sort values through external item updates (#2035) * maintain sort values through external item updates * CL; better JS --- CHANGELOG.md | 1 + src/components/basic_table/in_memory_table.js | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d11e281449..8af3bfb09fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ **Bug fixes** - Fixed `EuiCallOut` header icon alignment ([#2006](https://github.com/elastic/eui/pull/2006)) +- Fixed `EuiInMemoryTable` sort value persistence through lifecycle updates ([#2035](https://github.com/elastic/eui/pull/2035)) **Breaking changes** diff --git a/src/components/basic_table/in_memory_table.js b/src/components/basic_table/in_memory_table.js index a02252e8532..ea0d9477880 100644 --- a/src/components/basic_table/in_memory_table.js +++ b/src/components/basic_table/in_memory_table.js @@ -163,6 +163,7 @@ export class EuiInMemoryTable extends Component { // We have new items because an external search has completed, so reset pagination state. return { prevProps: { + ...prevState.prevProps, items: nextProps.items, }, pageIndex: 0,