Browse Source

tx info modal hide tabs; reset tab state on close

all-modes
pbca26 8 years ago
parent
commit
f3be7fa68d
  1. 4
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js
  2. 4
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js

4
react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js

@ -15,6 +15,10 @@ class WalletsTxInfo extends React.Component {
toggleTxInfoModal() {
Store.dispatch(toggleDashboardTxInfoModal(false));
this.setState(Object.assign({}, this.state, {
activeTab: 0,
}));
}
openTab(tab) {

4
react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js

@ -22,7 +22,7 @@ const WalletsTxInfoRender = function(txInfo) {
</li>
{ this.isNativeMode() &&
<li className={ this.state.activeTab === 1 ? 'active' : '' }>
<li className={ this.state.activeTab === 1 ? 'hide active' : '' }>
<a onClick={ () => this.openTab(1) }>
<i className="icon md-plus-square"></i>Vjointsplits, Details
</a>
@ -30,7 +30,7 @@ const WalletsTxInfoRender = function(txInfo) {
}
{ this.isNativeMode() &&
<li className={ this.state.activeTab === 2 ? 'active' : '' }>
<li className={ this.state.activeTab === 2 ? 'hide active' : '' }>
<a onClick={ () => this.openTab(2) }>
<i className="icon wb-briefcase"></i>Hex
</a>

Loading…
Cancel
Save