Fix autocomplete not displaying empty strings and zeroes

dev 2.0.0-beta.15
Vitaliy Filippov 2019-02-10 17:41:02 +03:00
parent 210297da83
commit ecbfe34d47
2 changed files with 6 additions and 2 deletions

View File

@ -412,7 +412,11 @@ const factory = (Chip, Input) => {
onKeyUp={this.handleQueryKeyUp}
theme={theme}
themeNamespace="input"
value={this.state.query == null ? (this.props.multiple || !this.props.value ? '' : this.source().get(''+this.props.value)) : this.state.query}
value={this.state.query == null
? (this.props.multiple || this.props.value == null
? ''
: this.source().get(''+this.props.value))
: this.state.query}
/>
<Portal>
{this.state.focus ? this.renderSuggestionList() : null}

View File

@ -2,7 +2,7 @@
"name": "react-toolbox",
"description": "A set of React components implementing Google's Material Design specification with the power of CSS Modules.",
"homepage": "http://www.react-toolbox.io",
"version": "2.0.0-beta.14",
"version": "2.0.0-beta.15",
"main": "./lib",
"module": "./components",
"author": {