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

react-selectize

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-selectize - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

5

CHANGELOG.md

@@ -28,1 +28,6 @@ # React Selectize

* changed the signature of renderOption & renderValue props from `Int -> Item -> ReactElement` to `Item -> ReactElement`
## v0.2.1 / 20th September 2015
* fixed React Warnings caused by missing key property for ValueWrapper components
* allowing for wide range of react versions including 0.14.x-rc*
* uid property for MultiSelect components

5

package.json
{
"name": "react-selectize",
"version": "0.2.0",
"version": "0.2.1",
"description": "react implementation of selectize",

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

"prelude-ls": "^1.1.1",
"react": "^0.13.1"
"react": ">=0.13.3 || ^0.14.0-beta"
},

@@ -31,2 +31,3 @@ "devDependencies": {

"jquery-browserify": "^1.8.1",
"jsdom": "^3.1.2",
"liveify": "^2.0.0",

@@ -33,0 +34,0 @@ "livescript": "^1.4.0",

@@ -37,5 +37,5 @@ (function(){

render: function(){
var ref$, anchor, search, values, onAnchorChange, onSearchChange, onValuesChange, filteredOptions, options, autosize, disabled, dropdownDirection, groupId, groups, groupsAsColumns, renderGroupTitle, this$ = this;
var ref$, anchor, search, values, onAnchorChange, onSearchChange, onValuesChange, filteredOptions, options, autosize, disabled, dropdownDirection, groupId, groups, groupsAsColumns, renderGroupTitle, uid, this$ = this;
ref$ = this.getComputedState(), anchor = ref$.anchor, search = ref$.search, values = ref$.values, onAnchorChange = ref$.onAnchorChange, onSearchChange = ref$.onSearchChange, onValuesChange = ref$.onValuesChange, filteredOptions = ref$.filteredOptions, options = ref$.options;
ref$ = this.props, autosize = ref$.autosize, disabled = ref$.disabled, dropdownDirection = ref$.dropdownDirection, groupId = ref$.groupId, groups = ref$.groups, groupsAsColumns = ref$.groupsAsColumns, renderGroupTitle = ref$.renderGroupTitle;
ref$ = this.props, autosize = ref$.autosize, disabled = ref$.disabled, dropdownDirection = ref$.dropdownDirection, groupId = ref$.groupId, groups = ref$.groups, groupsAsColumns = ref$.groupsAsColumns, renderGroupTitle = ref$.renderGroupTitle, uid = ref$.uid;
return ReactSelectize(import$({

@@ -50,2 +50,3 @@ autosize: autosize,

renderGroupTitle: renderGroupTitle,
uid: uid,
ref: 'select',

@@ -52,0 +53,0 @@ anchor: anchor,

58

src/ReactSelectize.js
(function(){
var ref$, each, filter, find, findIndex, initial, last, map, objToPairs, partition, reject, reverse, sortBy, sum, clamp, isEqualToObject, React, div, input, span, createClass, createFactory, cancelEvent, OptionWrapper, ValueWrapper;
var ref$, each, filter, find, findIndex, initial, last, map, objToPairs, partition, reject, reverse, sortBy, sum, clamp, isEqualToObject, React, div, input, span, createClass, createFactory, findDOMNode, cancelEvent, OptionWrapper, ValueWrapper;
ref$ = require('prelude-ls'), each = ref$.each, filter = ref$.filter, find = ref$.find, findIndex = ref$.findIndex, initial = ref$.initial, last = ref$.last, map = ref$.map, objToPairs = ref$.objToPairs, partition = ref$.partition, reject = ref$.reject, reverse = ref$.reverse, sortBy = ref$.sortBy, sum = ref$.sum;
ref$ = require('prelude-extension'), clamp = ref$.clamp, isEqualToObject = ref$.isEqualToObject;
React = require('react'), ref$ = React.DOM, div = ref$.div, input = ref$.input, span = ref$.span, createClass = React.createClass, createFactory = React.createFactory;
React = require('react'), ref$ = React.DOM, div = ref$.div, input = ref$.input, span = ref$.span, createClass = React.createClass, createFactory = React.createFactory, findDOMNode = React.findDOMNode;
cancelEvent = function(e){

@@ -130,3 +130,3 @@ e.preventDefault();

render: function(){
var anchorIndex, renderOptions, ref$, ref1$, groups, this$ = this;
var anchorIndex, renderSelectedValues, renderOptions, ref$, ref1$, groups, this$ = this;
anchorIndex = (function(){

@@ -145,2 +145,16 @@ var ref$;

}.call(this));
renderSelectedValues = function(it){
return map(function(index){
var item, uid;
item = this$.props.values[index];
uid = this$.props.uid(item);
return ValueWrapper({
uid: uid,
key: uid,
item: item,
renderItem: this$.props.renderValue
});
})(
it);
};
return div({

@@ -161,12 +175,3 @@ className: ("react-selectize \n" + this.props.className + " \n" + (this.props.disabled ? 'disabled' : '') + " \n" + (this.props.open ? 'open' : '') + " \n" + (this.props.dropdownDirection === -1 ? 'flipped' : '')).replace(/\s+/g, ' '),

className: 'placeholder'
}, this.props.placeholder) : void 8, map(function(index){
var item;
item = this$.props.values[index];
return ValueWrapper({
uid: this$.props.uid(item),
item: item,
renderItem: this$.props.renderValue
});
})(
(function(){
}, this.props.placeholder) : void 8, renderSelectedValues((function(){
var i$, to$, results$ = [];

@@ -315,12 +320,3 @@ for (i$ = 0, to$ = anchorIndex; i$ <= to$; ++i$) {

}
}), map(function(index){
var item;
item = this$.props.values[index];
return ValueWrapper({
uid: this$.props.uid(item),
item: item,
renderItem: this$.props.renderValue
});
})(
(function(){
}), renderSelectedValues((function(){
var i$, to$, results$ = [];

@@ -460,3 +456,3 @@ for (i$ = anchorIndex + 1, to$ = this.props.values.length; i$ < to$; ++i$) {

}
if (element === this$.getDOMNode()) {
if (element === findDOMNode(this$)) {
return true;

@@ -485,7 +481,7 @@ }

}
x$ = $search = this.refs.search.getDOMNode();
x$ = $search = findDOMNode(this.refs.search);
x$.style.width = 0;
x$.style.width = this.props.autosize($search);
if (!!this.refs.dropdown) {
this.refs.dropdown.getDOMNode().style.bottom = this.props.dropdownDirection === -1 ? this.refs.control.getDOMNode().offsetHeight : "";
findDOMNode(this.refs.dropdown).style.bottom = this.props.dropdownDirection === -1 ? findDOMNode(this.refs.control).offsetHeight : "";
}

@@ -506,9 +502,9 @@ },

blur: function(){
this.refs.search.getDOMNode().blur();
findDOMNode(this.refs.search).blur();
this.props.onBlur(this.props.values, 'blur');
},
focus: function(){
if (this.refs.search.getDOMNode() !== document.activeElement) {
if (findDOMNode(this.refs.search) !== document.activeElement) {
this.focusLock = true;
this.refs.search.getDOMNode().focus();
findDOMNode(this.refs.search).focus();
}

@@ -521,6 +517,6 @@ },

var ref$, ref1$, optionElement, parentElement, optionHeight;
if ((ref$ = (ref1$ = this$.refs) != null ? ref1$["option-" + uid].getDOMNode() : void 8) != null) {
if ((ref$ = findDOMNode((ref1$ = this$.refs) != null ? ref1$["option-" + uid] : void 8)) != null) {
optionElement = ref$;
}
parentElement = this$.refs.dropdown.getDOMNode();
parentElement = findDOMNode(this$.refs.dropdown);
if (!!optionElement) {

@@ -527,0 +523,0 @@ optionHeight = optionElement.offsetHeight - 1;

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