Skip to content

Commit

Permalink
Merge pull request #17 in NFE/account-selector-react from feature/Ret…
Browse files Browse the repository at this point in the history
…urn-account-number-on-tab to master

* commit '297412f5235fa7483bb60e9c7c13769a10814155':
  Maintain input field value on tab
  Select account on highligted account then tab
  • Loading branch information
Torgeir Pedersen Cook committed Aug 5, 2016
2 parents 7445bc1 + 6a8543d commit e30ef27
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/account-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@ export default class AccountSelector extends Component {
}

onInputTab(evt) {
const {selectedAccount} = this.state;
const value = selectedAccount ? selectedAccount.name : '';
const {selectedAccount, value} = this.state;
const selectedValue = selectedAccount ? selectedAccount.name : value;
this.setState({
value,
value : selectedValue,
showAccountSuggestions: false,
}, () => {
if (selectedAccount) {
this.onAccountSelect(selectedAccount);
}
});
}

Expand Down

0 comments on commit e30ef27

Please sign in to comment.