diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-08-26 06:40:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-26 06:40:49 +0800 |
commit | b6b57d928a8854baf674763211c407bb4c976dba (patch) | |
tree | 0967f2b850593f7bd81d24ae62b58ea030fbda76 /ui/app/send.js | |
parent | bbb684309e04030dbf288f3e933222b3d27d9b54 (diff) | |
parent | a1fd2b6688093119042e773762081114c0f29ce9 (diff) | |
download | tangerine-wallet-browser-b6b57d928a8854baf674763211c407bb4c976dba.tar tangerine-wallet-browser-b6b57d928a8854baf674763211c407bb4c976dba.tar.gz tangerine-wallet-browser-b6b57d928a8854baf674763211c407bb4c976dba.tar.bz2 tangerine-wallet-browser-b6b57d928a8854baf674763211c407bb4c976dba.tar.lz tangerine-wallet-browser-b6b57d928a8854baf674763211c407bb4c976dba.tar.xz tangerine-wallet-browser-b6b57d928a8854baf674763211c407bb4c976dba.tar.zst tangerine-wallet-browser-b6b57d928a8854baf674763211c407bb4c976dba.zip |
Merge pull request #590 from MetaMask/i432PersistFormState
Persist form state when closing popup
Diffstat (limited to 'ui/app/send.js')
-rw-r--r-- | ui/app/send.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/ui/app/send.js b/ui/app/send.js index 06ea199f4..0cc3a032f 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -1,5 +1,5 @@ const inherits = require('util').inherits -const Component = require('react').Component +const PersistentForm = require('../lib/persistent-form') const h = require('react-hyperscript') const connect = require('react-redux').connect const Identicon = require('./components/identicon') @@ -29,12 +29,14 @@ function mapStateToProps (state) { return result } -inherits(SendTransactionScreen, Component) +inherits(SendTransactionScreen, PersistentForm) function SendTransactionScreen () { - Component.call(this) + PersistentForm.call(this) } SendTransactionScreen.prototype.render = function () { + this.persistentFormParentId = 'send-tx-form' + var state = this.props var address = state.address var account = state.account @@ -137,6 +139,9 @@ SendTransactionScreen.prototype.render = function () { h('input.large-input', { name: 'address', placeholder: 'Recipient Address', + dataset: { + persistentFormId: 'recipient-address', + }, }), ]), @@ -150,6 +155,9 @@ SendTransactionScreen.prototype.render = function () { style: { marginRight: 6, }, + dataset: { + persistentFormId: 'tx-amount', + }, }), h('button.primary', { @@ -185,11 +193,12 @@ SendTransactionScreen.prototype.render = function () { width: '100%', resize: 'none', }, + dataset: { + persistentFormId: 'tx-data', + }, }), ]), - ]) - ) } |