Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-select-plus

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select-plus - npm Package Compare versions

Comparing version 1.0.0-rc.3.patch5 to 1.0.0-rc.3.patch6

.vscode/tasks.json

23

lib/Async.js

@@ -174,15 +174,26 @@ 'use strict';

var newInputValue = inputValue;
if (onInputChange) {
var value = onInputChange(newInputValue);
// Note: != used deliberately here to catch undefined and null
if (value != null && typeof value !== 'object') {
newInputValue = '' + value;
}
}
var transformedInputValue = newInputValue;
if (ignoreAccents) {
inputValue = (0, _utilsStripDiacritics2['default'])(inputValue);
transformedInputValue = (0, _utilsStripDiacritics2['default'])(transformedInputValue);
}
if (ignoreCase) {
inputValue = inputValue.toLowerCase();
transformedInputValue = transformedInputValue.toLowerCase();
}
if (onInputChange) {
onInputChange(inputValue);
}
this.loadOptions(transformedInputValue);
return this.loadOptions(inputValue);
// Return new input value, but without applying toLowerCase() to avoid modifying the user's view case of the input while typing.
return newInputValue;
}

@@ -189,0 +200,0 @@ }, {

@@ -1293,3 +1293,2 @@ /*!

var isOpen = typeof this.props.isOpen === 'boolean' ? this.props.isOpen : this.state.isOpen;
if (this.props.multi && !options.length && valueArray.length && !this.state.inputValue) isOpen = false;
var focusedOptionIndex = this.getFocusableOptionIndex(valueArray[0]);

@@ -1296,0 +1295,0 @@

{
"name": "react-select-plus",
"version": "1.0.0-rc.3.patch5",
"version": "1.0.0-rc.3.patch6",
"description": "A fork of react-select with support for option groups",

@@ -5,0 +5,0 @@ "main": "lib/Select.js",

@@ -142,16 +142,26 @@ import React, { Component, PropTypes } from 'react';

const { ignoreAccents, ignoreCase, onInputChange } = this.props;
let newInputValue = inputValue;
if (onInputChange) {
const value = onInputChange(newInputValue);
// Note: != used deliberately here to catch undefined and null
if (value != null && typeof value !== 'object') {
newInputValue = '' + value;
}
}
let transformedInputValue = newInputValue;
if (ignoreAccents) {
inputValue = stripDiacritics(inputValue);
transformedInputValue = stripDiacritics(transformedInputValue);
}
if (ignoreCase) {
inputValue = inputValue.toLowerCase();
transformedInputValue = transformedInputValue.toLowerCase();
}
if (onInputChange) {
onInputChange(inputValue);
}
this.loadOptions(transformedInputValue);
return this.loadOptions(inputValue);
// Return new input value, but without applying toLowerCase() to avoid modifying the user's view case of the input while typing.
return newInputValue;
}

@@ -158,0 +168,0 @@

@@ -1186,3 +1186,2 @@ /*!

let isOpen = typeof this.props.isOpen === 'boolean' ? this.props.isOpen : this.state.isOpen;
if (this.props.multi && !options.length && valueArray.length && !this.state.inputValue) isOpen = false;
const focusedOptionIndex = this.getFocusableOptionIndex(valueArray[0]);

@@ -1189,0 +1188,0 @@

@@ -436,2 +436,11 @@ 'use strict';

});
it('should change the value when onInputChange returns a value', () => {
const onInputChange = sinon.stub().returns('2');
const instance = createControl({
onInputChange,
});
typeSearchText('1');
return expect(filterInputNode.value, 'to equal', '2');
});
});

@@ -438,0 +447,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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