summaryrefslogtreecommitdiffhomepage
path: root/app/components/AccountInput.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/components/AccountInput.js')
-rw-r--r--app/components/AccountInput.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/components/AccountInput.js b/app/components/AccountInput.js
index 5869ae986c..eba498fb95 100644
--- a/app/components/AccountInput.js
+++ b/app/components/AccountInput.js
@@ -3,12 +3,24 @@ import { formatAccount } from '../lib/formatters';
export default class AccountInput extends Component {
+ /**
+ * Prop types
+ * @static
+ *
+ * @memberOf AccountInput
+ */
static propTypes = {
value: PropTypes.string,
onEnter: PropTypes.func,
onChange: PropTypes.func
}
+ /**
+ * Creates an instance of AccountInput.
+ * @param {object} props
+ *
+ * @memberOf AccountInput
+ */
constructor(props) {
super(props);
@@ -21,6 +33,9 @@ export default class AccountInput extends Component {
};
}
+ /**
+ * @override
+ */
componentWillReceiveProps(nextProps) {
const nextVal = this.sanitize(nextProps.value);
if(nextVal !== this.state.value) {