intelicoreact 1.2.66 → 1.2.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,7 +88,6 @@ var Dropdown = function Dropdown(_ref) {
88
88
  isMobileProp = _useIsMobile.isMobile;
89
89
 
90
90
  var isMobile = isMobileProp && withMobileLogic;
91
- if (isMobile) isSearchable = true;
92
91
  var dropdownId = id || fieldKey;
93
92
 
94
93
  var _useState = (0, _react.useState)(false),
@@ -142,6 +141,20 @@ var Dropdown = function Dropdown(_ref) {
142
141
  setScrollHeight = _useState18[1];
143
142
 
144
143
  if (!options) return null;
144
+ var getTotalOptions = (0, _react.useCallback)(function () {
145
+ return options === null || options === void 0 ? void 0 : options.reduce(function (result, item) {
146
+ if (item !== null && item !== void 0 && item.list) {
147
+ var _item$list;
148
+
149
+ result += (item === null || item === void 0 ? void 0 : (_item$list = item.list) === null || _item$list === void 0 ? void 0 : _item$list.length) || 0;
150
+ } else {
151
+ ++result;
152
+ }
153
+
154
+ return result;
155
+ }, 0);
156
+ }, [options]);
157
+ if (isMobile) isSearchable = getTotalOptions() > (minItemsForShowMobileSearch || MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH);
145
158
 
146
159
  var moveOtherToEnd = function moveOtherToEnd(options) {
147
160
  var otherIndex = options === null || options === void 0 ? void 0 : options.findIndex(function (option) {
@@ -427,20 +440,6 @@ var Dropdown = function Dropdown(_ref) {
427
440
  return newData;
428
441
  };
429
442
 
430
- var getTotalOptions = (0, _react.useCallback)(function () {
431
- return options === null || options === void 0 ? void 0 : options.reduce(function (result, item) {
432
- if (item !== null && item !== void 0 && item.list) {
433
- var _item$list;
434
-
435
- result += (item === null || item === void 0 ? void 0 : (_item$list = item.list) === null || _item$list === void 0 ? void 0 : _item$list.length) || 0;
436
- } else {
437
- ++result;
438
- }
439
-
440
- return result;
441
- }, 0);
442
- }, [options]);
443
-
444
443
  var getListMarkUp = function getListMarkUp() {
445
444
  var _cn3, _cn4, _getSortedOptions;
446
445
 
@@ -462,7 +461,7 @@ var Dropdown = function Dropdown(_ref) {
462
461
  onClick: function onClick() {
463
462
  return setIsOpen(false);
464
463
  }
465
- }))), (isSearchable || getTotalOptions() > (minItemsForShowMobileSearch || MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH)) && /*#__PURE__*/_react.default.createElement("div", {
464
+ }))), isSearchable && /*#__PURE__*/_react.default.createElement("div", {
466
465
  className: (0, _classnames.default)("".concat(RC, "__list-header-row"))
467
466
  }, /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({
468
467
  ref: searchInputRef,
@@ -368,6 +368,11 @@
368
368
  flex-direction: row;
369
369
  align-items: center;
370
370
  min-height: 24px;
371
+ box-sizing: border-box;
372
+
373
+ &:first-child {
374
+ padding-right: 50px;
375
+ }
371
376
 
372
377
  .input__wrap {
373
378
  width: 100%;
@@ -342,6 +342,11 @@
342
342
  align-items: center;
343
343
  min-height: 24px;
344
344
  justify-content: space-between;
345
+ box-sizing: border-box;
346
+
347
+ &:first-child {
348
+ padding-right: 50px;
349
+ }
345
350
 
346
351
  .input__wrap {
347
352
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.2.66",
3
+ "version": "1.2.68",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [