react-interface
Advanced tools
Comparing version 0.9.4-alpha.32 to 0.9.4-alpha.34
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _templateObject = _taggedTemplateLiteralLoose(['\n display: inline-block;\n ', '\n ', '\n ', '\n ', '\n ', '\n'], ['\n display: inline-block;\n ', '\n ', '\n ', '\n ', '\n ', '\n']); | ||
var _templateObject = _taggedTemplateLiteralLoose(['\n display: inline-flex;\n // display: inline-block;\n ', '\n ', '\n ', '\n ', '\n ', '\n'], ['\n display: inline-flex;\n // display: inline-block;\n ', '\n ', '\n ', '\n ', '\n ', '\n']); | ||
@@ -5,0 +5,0 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } |
@@ -153,3 +153,4 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
selected = _props2.selected, | ||
renderMultiPlaceholder = _props2.renderMultiPlaceholder, | ||
renderMultiSelected = _props2.renderMultiSelected, | ||
renderSelected = _props2.renderSelected, | ||
placeholder = _props2.placeholder, | ||
@@ -167,3 +168,15 @@ getLabel = _props2.getLabel; | ||
if (selected.length === 1 || !renderMultiPlaceholder) { | ||
if (selected.length === 1 && renderSelected) { | ||
return renderSelected(selected[0]); | ||
} | ||
if (selected.length === 1 && !renderSelected) { | ||
return React.createElement( | ||
Tag, | ||
null, | ||
getLabel(selected[0]) | ||
); | ||
} | ||
if (selected.length > 1 && !renderMultiSelected) { | ||
return selected.map(function (s) { | ||
@@ -174,4 +187,4 @@ return React.createElement( | ||
React.createElement( | ||
'span', | ||
null, | ||
'div', | ||
{ key: getLabel(s) }, | ||
_this3.renderOption(s) | ||
@@ -184,3 +197,3 @@ ) | ||
if (selected.length > 1) { | ||
return renderMultiPlaceholder(selected); | ||
return renderMultiSelected(selected); | ||
} | ||
@@ -187,0 +200,0 @@ }; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _templateObject = _taggedTemplateLiteralLoose(['\n display: inline-block;\n ', '\n ', '\n ', '\n ', '\n ', '\n'], ['\n display: inline-block;\n ', '\n ', '\n ', '\n ', '\n ', '\n']); | ||
var _templateObject = _taggedTemplateLiteralLoose(['\n display: inline-flex;\n // display: inline-block;\n ', '\n ', '\n ', '\n ', '\n ', '\n'], ['\n display: inline-flex;\n // display: inline-block;\n ', '\n ', '\n ', '\n ', '\n ', '\n']); | ||
@@ -10,0 +10,0 @@ var _react = require('react'); |
@@ -184,3 +184,4 @@ 'use strict'; | ||
selected = _props2.selected, | ||
renderMultiPlaceholder = _props2.renderMultiPlaceholder, | ||
renderMultiSelected = _props2.renderMultiSelected, | ||
renderSelected = _props2.renderSelected, | ||
placeholder = _props2.placeholder, | ||
@@ -198,3 +199,15 @@ getLabel = _props2.getLabel; | ||
if (selected.length === 1 || !renderMultiPlaceholder) { | ||
if (selected.length === 1 && renderSelected) { | ||
return renderSelected(selected[0]); | ||
} | ||
if (selected.length === 1 && !renderSelected) { | ||
return _react2.default.createElement( | ||
Tag, | ||
null, | ||
getLabel(selected[0]) | ||
); | ||
} | ||
if (selected.length > 1 && !renderMultiSelected) { | ||
return selected.map(function (s) { | ||
@@ -205,4 +218,4 @@ return _react2.default.createElement( | ||
_react2.default.createElement( | ||
'span', | ||
null, | ||
'div', | ||
{ key: getLabel(s) }, | ||
_this3.renderOption(s) | ||
@@ -215,3 +228,3 @@ ) | ||
if (selected.length > 1) { | ||
return renderMultiPlaceholder(selected); | ||
return renderMultiSelected(selected); | ||
} | ||
@@ -218,0 +231,0 @@ }; |
{ | ||
"name": "react-interface", | ||
"version": "0.9.4-alpha.32", | ||
"version": "0.9.4-alpha.34", | ||
"description": "react-interface React component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
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
255312
5275