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

Reset of the state when using referenceName #443

Open
eheslouisKlee opened this issue Jul 4, 2018 · 0 comments
Open

Reset of the state when using referenceName #443

eheslouisKlee opened this issue Jul 4, 2018 · 0 comments
Assignees

Comments

@eheslouisKlee
Copy link

Current behaviour

Description of the component: use of referenceName, fieldFor in the render and setting the values of the fieldfor in the componentWillMount.

The component does set the values in the componentWillMount like shown bellow:
image

but as soon as the references are loading, the values of the fieldFor (denominationSocial, siren) are set to null :
image

Expected behaviour

The values of the fieldFor should not be reset.

#Work around

Add a componentWillUpdate and check if the references are loading . In that case, reload the state with the correct value like done in the componentWillMount.

Versions

Focus-core: 2.2.1
Focus-components: 2.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant