diff --git a/js/actions/contract_agreement_list_actions.js b/js/actions/contract_agreement_list_actions.js index 93bc35ac..fe089f24 100644 --- a/js/actions/contract_agreement_list_actions.js +++ b/js/actions/contract_agreement_list_actions.js @@ -15,8 +15,9 @@ class ContractAgreementListActions { } fetchContractAgreementList(issuer, accepted, pending) { + this.actions.updateContractAgreementList(null); + return Q.Promise((resolve, reject) => { - this.actions.updateContractAgreementList(null); OwnershipFetcher.fetchContractAgreementList(issuer, accepted, pending) .then((contractAgreementList) => { if (contractAgreementList.count > 0) { diff --git a/js/components/ascribe_forms/input_textarea_toggable.js b/js/components/ascribe_forms/input_textarea_toggable.js index e6da5282..39ef36fc 100644 --- a/js/components/ascribe_forms/input_textarea_toggable.js +++ b/js/components/ascribe_forms/input_textarea_toggable.js @@ -20,6 +20,8 @@ let InputTextAreaToggable = React.createClass({ }, componentDidUpdate(prevProps, prevState) { + // if the components state value was changed during an update, we want to refresh it + // in this component as well as in the parent Property if(this.state.value !== prevState.value) { this.handleChange({ target: { @@ -28,6 +30,8 @@ let InputTextAreaToggable = React.createClass({ }); } + // Otherwise, if state wasn't defined beforehand and defaultValue is defined from the outside + // we set it as the component's state and update Property by calling handleChange if(!this.state.value && this.props.defaultValue) { this.handleChange({ target: { diff --git a/js/components/ascribe_settings/account_settings.js b/js/components/ascribe_settings/account_settings.js index aa50d719..7c769c22 100644 --- a/js/components/ascribe_settings/account_settings.js +++ b/js/components/ascribe_settings/account_settings.js @@ -19,8 +19,8 @@ import { getLangText } from '../../utils/lang_utils'; let AccountSettings = React.createClass({ propTypes: { - currentUser: React.PropTypes.object.required, - loadUser: React.PropTypes.func.required + currentUser: React.PropTypes.object.isRequired, + loadUser: React.PropTypes.func.isRequired }, handleSuccess(){ diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js index 76880304..98d8a8e7 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js @@ -57,6 +57,10 @@ let IkonotvRegisterPiece = React.createClass({ PieceStore.listen(this.onChange); UserActions.fetchCurrentUser(); + // Before we load the new piece, we reset the piece store to delete old data that we do + // not want to display to the user. + PieceActions.updatePiece({}); + let queryParams = this.getQuery(); // Since every step of this register process is atomic,