Merge pull request #1527 from waful/master

Content Manager: fix react-select blowing away user input on rerender
This commit is contained in:
Jim LAURIE 2018-07-13 12:20:44 +02:00 committed by GitHub
commit 94dce3444c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -141,6 +141,7 @@ class SelectMany extends React.Component {
isLoading={this.state.isLoading} isLoading={this.state.isLoading}
onMenuScrollToBottom={this.handleBottomScroll} onMenuScrollToBottom={this.handleBottomScroll}
onInputChange={this.handleInputChange} onInputChange={this.handleInputChange}
onSelectResetsInput={false}
multi multi
value={ value={
isNull(value) || isUndefined(value) || value.size === 0 isNull(value) || isUndefined(value) || value.size === 0

View File

@ -133,6 +133,7 @@ class SelectOne extends React.Component { // eslint-disable-line react/prefer-st
isLoading={this.state.isLoading} isLoading={this.state.isLoading}
onMenuScrollToBottom={this.handleBottomScroll} onMenuScrollToBottom={this.handleBottomScroll}
onInputChange={this.handleInputChange} onInputChange={this.handleInputChange}
onSelectResetsInput={false}
simpleValue simpleValue
value={isNull(value) || isUndefined(value) ? null : { value={isNull(value) || isUndefined(value) ? null : {
value: isFunction(value.toJS) ? value.toJS() : value, value: isFunction(value.toJS) ? value.toJS() : value,

View File

@ -22,7 +22,7 @@
"prepublishOnly": "IS_MONOREPO=true npm run build" "prepublishOnly": "IS_MONOREPO=true npm run build"
}, },
"devDependencies": { "devDependencies": {
"react-select": "^1.0.0-rc.5", "react-select": "^1.2.1",
"strapi-helper-plugin": "3.0.0-alpha.12.7.1" "strapi-helper-plugin": "3.0.0-alpha.12.7.1"
}, },
"author": { "author": {
@ -46,4 +46,4 @@
"npm": ">= 5.0.0" "npm": ">= 5.0.0"
}, },
"license": "MIT" "license": "MIT"
} }