Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Advancedsearch][FacetBox] missing assignment in Initial state #1395

Merged
merged 2 commits into from
Jul 20, 2017

Conversation

c3dr0x
Copy link
Contributor

@c3dr0x c3dr0x commented Jun 12, 2017

Fix issue #1353

Initial state is wrongly set. The component doesn't work if it is rendered only once.

Copy link
Contributor

@Hartorn Hartorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also correct the import (use import instead of require) ?
Also, the code between willReceiveProps and getInitialState is duplicated.

And the export is shitty :) Please redo it like this : https://github.com/KleeGroup/focus-components/blob/master/src/common/field/index.js#L81

@@ -50,7 +50,7 @@ let FacetBox = {
getInitialState: function () {
let openedFacetList = this.props.openedFacetList;
if (Object.keys(openedFacetList).length == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ===

Refactor computation of openedFacetList
Copy link
Contributor

@Hartorn Hartorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleaning

@Hartorn Hartorn modified the milestones: 2.2.0, Short term release Jul 20, 2017
@Hartorn Hartorn merged commit 38f96ec into develop Jul 20, 2017
@Hartorn Hartorn deleted the fix-initial-state branch July 20, 2017 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants