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

react-select-checked

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select-checked - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

.idea/inspectionProfiles/Project_Default.xml

62

build/elements/CheckedSelect.js

@@ -85,4 +85,2 @@ 'use strict';

this._options = options;
if (this.props.value.length) {

@@ -186,6 +184,4 @@ currentValue = this.props.value;

}, {
key: 'renderMenu',
value: function renderMenu(_ref) {
var _this6 = this;
key: 'renderOptions',
value: function renderOptions(_ref) {
var focusedOption = _ref.focusedOption,

@@ -200,6 +196,3 @@ onFocus = _ref.onFocus,

var props = this.props;
var Option = optionComponent;
return options.map(function (option, i) {

@@ -216,21 +209,3 @@ var isSelected = valueArray.some(function (selectedOption) {

});
if (i === 0) {
return _react2.default.createElement(
'div',
{ key: 'option-' + i + '-' + option[valueKey] },
_react2.default.createElement(_OptionTools2.default, {
onAddAll: _this6.handleAddAll,
onClearAll: _this6.handleClearAll,
addAllTitle: props.addAllTitle,
clearAllTitle: props.clearAllTitle
}),
_react2.default.createElement(Option, {
className: optionClass,
option: option,
onFocus: onFocus,
onSelect: onSelect,
isSelected: isSelected
})
);
}
return _react2.default.createElement(

@@ -250,2 +225,33 @@ 'div',

}, {
key: 'renderMenu',
value: function renderMenu(params) {
var props = this.props;
var filteredOptions = params.options ? params.options.filter(function (option) {
return !option.disabled;
}).length : 0;
var optsContainerStyle = {
maxHeight: '150px',
overflow: 'scroll'
};
var optionItems = this.renderOptions(params);
return _react2.default.createElement(
'div',
null,
_react2.default.createElement(_OptionTools2.default, {
onAddAll: this.handleAddAll,
onClearAll: this.handleClearAll,
addAllTitle: props.addAllTitle,
clearAllTitle: props.clearAllTitle,
filteredOptions: filteredOptions
}),
_react2.default.createElement(
'div',
{ style: optsContainerStyle },
optionItems
)
);
}
}, {
key: 'getSelectComponent',

@@ -252,0 +258,0 @@ value: function getSelectComponent() {

@@ -62,3 +62,3 @@ 'use strict';

textAlign: 'center',
padding: '1em',
padding: '.5em',
borderBottom: '1px solid #ccc'

@@ -84,3 +84,6 @@ };

{ onClick: this.addAll, style: toolButtonStyle },
this.props.addAllTitle
this.props.addAllTitle,
' (',
this.props.filteredOptions,
')'
),

@@ -100,2 +103,3 @@ _react2.default.createElement(

OptionTools.propTypes = {
filteredOptions: _propTypes2.default.number,
onAddAll: _propTypes2.default.func,

@@ -102,0 +106,0 @@ onClearAll: _propTypes2.default.func,

{
"name": "react-select-checked",
"version": "0.1.6",
"version": "0.1.7",
"description": "A React select based on JedWatson/React-Select with checkmarks on selected options.",

@@ -13,3 +13,3 @@ "main": "build/index.js",

"react-input-autosize": "^2.0.1",
"react-select": "^1.0.0"
"react-select": "^1.2.1"
},

@@ -16,0 +16,0 @@ "author": "Riza Nugraha <rnugraha@gmail.com> (https://about.me/riza.nugraha)",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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