Socket
Socket
Sign inDemoInstall

react-select-allow-create

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select-allow-create - npm Package Compare versions

Comparing version 1.0.0-beta11.5 to 1.0.0-beta11.6

dist/react-select-allow-create.css

4

lib/Select.js

@@ -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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc