Bumped Material UI version (fixing issues with AutoComplete) (#2790)

Fixed issues with Searchable addresses
This commit is contained in:
Nicolas Gotchac
2016-10-21 17:01:06 +02:00
committed by Jaco Greeff
parent c24f4e87ad
commit dc5dd6b941
4 changed files with 87 additions and 23 deletions

View File

@@ -44,10 +44,24 @@ class InputAddress extends Component {
componentWillMount () {
const { value, text, accountsInfo, tokens } = this.props;
const account = accountsInfo[value] || tokens[value];
const hasAccount = account && !account.meta.deleted;
const inputValue = text && hasAccount ? account.name : value;
const isEmpty = (inputValue.length === 0);
const isEmpty = (!inputValue || inputValue.length === 0);
this.setState({ isEmpty });
}
componentWillReceiveProps (newProps) {
const { value, text } = newProps;
if (value === this.props.value && text === this.props.text) {
return;
}
const inputValue = text || value;
const isEmpty = (!inputValue || inputValue.length === 0);
this.setState({ isEmpty });
}