react-select-allow-create
Advanced tools
Comparing version 1.0.0-beta11.5 to 1.0.0-beta11.6
@@ -586,3 +586,5 @@ 'use strict'; | ||
selectFocusedOption: function selectFocusedOption() { | ||
if (this.props.allowCreate && !this.state.focusedOption) { | ||
var options = this.filterOptions(null); | ||
var validOption = this.state.focusedOption && options.length > 0; | ||
if (this.props.allowCreate && !validOption) { | ||
return this.selectValue(this.state.inputValue); | ||
@@ -589,0 +591,0 @@ } |
{ | ||
"name": "react-select-allow-create", | ||
"version": "1.0.0-beta11.5", | ||
"version": "1.0.0-beta11.6", | ||
"description": "A Select control built with and for ReactJS", | ||
@@ -5,0 +5,0 @@ "main": "lib/Select.js", |
@@ -537,3 +537,5 @@ import React from 'react'; | ||
selectFocusedOption () { | ||
if (this.props.allowCreate && (!this.state.focusedOption || this.filterOptions(null).length === 0 ) { | ||
var options = this.filterOptions(null); | ||
var validOption = this.state.focusedOption && options.length > 0; | ||
if (this.props.allowCreate && !validOption) { | ||
return this.selectValue(this.state.inputValue); | ||
@@ -540,0 +542,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
399749
7306