@luminati-io/uikit 3.0.22 → 3.0.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -24438,7 +24438,7 @@ var buildComponents = function buildComponents(props) {
24438
24438
  formatOptionLabel: props.formatOptionLabel
24439
24439
  });
24440
24440
  }
24441
- if (props.autosize === false) components.ValueContainer = _value_container__WEBPACK_IMPORTED_MODULE_5__.ValueContainer;
24441
+ if (props.autosize === false && props.multiselect) components.ValueContainer = _value_container__WEBPACK_IMPORTED_MODULE_5__.ValueContainer;
24442
24442
  return components;
24443
24443
  };
24444
24444
 
@@ -25180,7 +25180,7 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
25180
25180
  var optsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
25181
25181
  var moreOptRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
25182
25182
  var opts = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
25183
- return react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);
25183
+ return react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).filter(isValueChild);
25184
25184
  }, [length]);
25185
25185
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(opts),
25186
25186
  _useState2 = _slicedToArray(_useState, 2),
@@ -25211,7 +25211,7 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
25211
25211
  });
25212
25212
  } else tempOpts = opts;
25213
25213
  return tempOpts;
25214
- }, [optsRef, opts]);
25214
+ }, [optsRef, opts, length]);
25215
25215
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(function () {
25216
25216
  if (recalculationRender && optsRef.current) {
25217
25217
  var visible = calculateVisibleTags();
@@ -25229,14 +25229,19 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
25229
25229
  setRecalculationRender(true);
25230
25230
  }, [opts]);
25231
25231
  (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useResize)(handleResize);
25232
+
25233
+ // Keep standard placeholder and input from react-select
25234
+ var childsToRender = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).filter(function (child) {
25235
+ return !isValueChild(child);
25236
+ });
25232
25237
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(OptsWrapper, {
25233
25238
  ref: optsRef
25234
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_5__.c.ValueContainer, rest, !props.selectProps.inputValue && visibleOpts, (recalculationRender || hiddenCount > 0) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MoreOpt, {
25239
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_5__.c.ValueContainer, rest, visibleOpts, (recalculationRender || hiddenCount > 0) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MoreOpt, {
25235
25240
  key: "more-badge",
25236
25241
  ref: moreOptRef,
25237
25242
  inputProps: props,
25238
25243
  count: hiddenCount
25239
- })));
25244
+ }), childsToRender));
25240
25245
  };
25241
25246
  var ValueContainer = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(ValueContainerComponent);
25242
25247
  var MoreOpt = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
@@ -25264,6 +25269,10 @@ var Generic = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withC
25264
25269
  })(["", ""], function (prop) {
25265
25270
  return prop.$css;
25266
25271
  });
25272
+ var isValueChild = function isValueChild(child) {
25273
+ var _child$type;
25274
+ return ['MultiValue', 'SingleValue'].includes((child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name) || '');
25275
+ };
25267
25276
 
25268
25277
  /***/ }),
25269
25278