From 74956c06f6e4577742735e6247dd1186bea5d29b Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Thu, 18 May 2017 22:27:16 -0600 Subject: [PATCH] Fix word form not clearing --- src/components/management/IPAField.jsx | 6 ++++++ src/components/management/WordForm.jsx | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/management/IPAField.jsx b/src/components/management/IPAField.jsx index 885edea..48dad98 100644 --- a/src/components/management/IPAField.jsx +++ b/src/components/management/IPAField.jsx @@ -25,6 +25,12 @@ export class IPAField extends Component { this.field = null; } + componentWillReceiveProps (nextProps) { + this.setState({ + value: nextProps.value + }); + } + showHelp () { if (this.state.doShowHelp) { return ( diff --git a/src/components/management/WordForm.jsx b/src/components/management/WordForm.jsx index 02b3d52..ff1d72a 100644 --- a/src/components/management/WordForm.jsx +++ b/src/components/management/WordForm.jsx @@ -98,7 +98,7 @@ export class WordForm extends Component {

- this.setState({ wordPronunciation: newValue })} />
@@ -143,11 +143,10 @@ export class WordForm extends Component {

+ }} /> {(!this.state.detailsIsValid) ? (