Skip to content

Commit

Permalink
Merge branch 'master' into pr/544
Browse files Browse the repository at this point in the history
  • Loading branch information
markov00 committed Feb 21, 2020
2 parents 3e2b507 + df16bb9 commit 4d73ff3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [17.1.1](https://github.com/elastic/elastic-charts/compare/v17.1.0...v17.1.1) (2020-02-21)


### Bug Fixes

* redux connect memo issue related to spec upserting ([#563](https://github.com/elastic/elastic-charts/issues/563)) ([f3a05f1](https://github.com/elastic/elastic-charts/commit/f3a05f1abe35d690e433a8ad9b6f5a999a7da7fe))

# [17.1.0](https://github.com/elastic/elastic-charts/compare/v17.0.3...v17.1.0) (2020-02-12)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@elastic/charts",
"description": "Elastic-Charts data visualization library",
"version": "17.1.0",
"version": "17.1.1",
"author": "Marco Vettorello <[email protected]>",
"license": "Apache-2.0",
"main": "dist/index.js",
Expand Down
9 changes: 8 additions & 1 deletion src/state/spec_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,12 @@ const mapDispatchToProps = (dispatch: Dispatch): DispatchProps =>
);

export function getConnect() {
return connect(null, mapDispatchToProps);
/**
* Redux assumes shallowEqual for all connected components
*
* This causes an issue where the specs are cleared and memoized spec components will never be
* rerendered and thus never re-upserted to the state. Setting pure to false solves this issue
* and doesn't cause traditional performance degradations.
*/
return connect(null, mapDispatchToProps, null, { pure: false });
}

0 comments on commit 4d73ff3

Please sign in to comment.