react-select-search
Advanced tools
Comparing version 1.0.0-rc12 to 1.0.0-rc13
@@ -28,2 +28,8 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
@@ -112,3 +118,8 @@ | ||
className: classNameFn('value') | ||
}, renderValue(valueProps, snapshot, classNameFn('input'))) : _react.default.createElement(_Value.default, { | ||
}, renderValue(_objectSpread({}, valueProps, { | ||
placeholder: search ? placeholder : null, | ||
autoFocus: search ? autoFocus : null, | ||
autoComplete: search ? autoComplete : null, | ||
value: search ? value : null | ||
}), snapshot, classNameFn('input'))) : _react.default.createElement(_Value.default, { | ||
snapshot: snapshot, | ||
@@ -115,0 +126,0 @@ disabled: disabled, |
@@ -0,1 +1,7 @@ | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
@@ -91,3 +97,8 @@ | ||
className: classNameFn('value') | ||
}, renderValue(valueProps, snapshot, classNameFn('input'))) : React.createElement(Value, { | ||
}, renderValue(_objectSpread({}, valueProps, { | ||
placeholder: search ? placeholder : null, | ||
autoFocus: search ? autoFocus : null, | ||
autoComplete: search ? autoComplete : null, | ||
value: search ? value : null | ||
}), snapshot, classNameFn('input'))) : React.createElement(Value, { | ||
snapshot: snapshot, | ||
@@ -94,0 +105,0 @@ disabled: disabled, |
{ | ||
"name": "react-select-search", | ||
"version": "1.0.0-rc12", | ||
"version": "1.0.0-rc13", | ||
"description": "Lightweight select component for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/esm/index.js", |
@@ -78,3 +78,13 @@ import React, { useEffect, forwardRef, useMemo, memo, useRef } from 'react'; | ||
<div className={classNameFn('value')}> | ||
{renderValue(valueProps, snapshot, classNameFn('input'))} | ||
{renderValue( | ||
{ | ||
...valueProps, | ||
placeholder: (search) ? placeholder : null, | ||
autoFocus: (search) ? autoFocus : null, | ||
autoComplete: (search) ? autoComplete : null, | ||
value: (search) ? value : null, | ||
}, | ||
snapshot, | ||
classNameFn('input'), | ||
)} | ||
</div> | ||
@@ -81,0 +91,0 @@ ) : ( |
Sorry, the diff of this file is not supported yet
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
151884
3271