Bumped Material UI version (fixing issues with AutoComplete) (#2790)
Fixed issues with Searchable addresses
This commit is contained in:
committed by
Jaco Greeff
parent
c24f4e87ad
commit
dc5dd6b941
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user