intelicoreact 1.1.22 → 1.1.23
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.
|
@@ -353,13 +353,37 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
353
353
|
};
|
|
354
354
|
|
|
355
355
|
var getListMarkUp = function getListMarkUp() {
|
|
356
|
+
var _getSortedOptions;
|
|
357
|
+
|
|
356
358
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
357
359
|
className: (0, _classnames.default)("".concat(RC, "__list"), (0, _defineProperty2.default)({}, "".concat(RC, "__list-top"), isListTop)),
|
|
358
360
|
ref: dropdownListRef
|
|
359
|
-
}, getSortedOptions(depend.options).map(function (
|
|
360
|
-
var
|
|
361
|
+
}, (_getSortedOptions = getSortedOptions(depend.options)) === null || _getSortedOptions === void 0 ? void 0 : _getSortedOptions.map(function (option) {
|
|
362
|
+
var _option$items;
|
|
363
|
+
|
|
364
|
+
if (option !== null && option !== void 0 && (_option$items = option.items) !== null && _option$items !== void 0 && _option$items.length) {
|
|
365
|
+
if (!isSearchable || !isSearchChanged) {
|
|
366
|
+
return filteredOptionList(option);
|
|
367
|
+
} else {
|
|
368
|
+
var _option$items2;
|
|
369
|
+
|
|
370
|
+
var items = (_option$items2 = option.items) === null || _option$items2 === void 0 ? void 0 : _option$items2.slice().filter(function (el) {
|
|
371
|
+
var _el$label2;
|
|
372
|
+
|
|
373
|
+
return (el === null || el === void 0 ? void 0 : (_el$label2 = el.label) === null || _el$label2 === void 0 ? void 0 : _el$label2.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || '')) || !(el !== null && el !== void 0 && el.value) || (el === null || el === void 0 ? void 0 : el.value) === '';
|
|
374
|
+
});
|
|
375
|
+
if (items !== null && items !== void 0 && items.length) return filteredOptionList(_objectSpread(_objectSpread({}, option), {}, {
|
|
376
|
+
items: items
|
|
377
|
+
}));
|
|
378
|
+
return null;
|
|
379
|
+
}
|
|
380
|
+
} else {
|
|
381
|
+
var _option$label;
|
|
361
382
|
|
|
362
|
-
|
|
383
|
+
if (!isSearchable || !isSearchChanged || option !== null && option !== void 0 && (_option$label = option.label) !== null && _option$label !== void 0 && _option$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || '') || !(option !== null && option !== void 0 && option.value) || (option === null || option === void 0 ? void 0 : option.value) === '') {
|
|
384
|
+
return getMarkupForElement(option);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
363
387
|
}), !filteredItems.length && !filteredGroups.length && /*#__PURE__*/_react.default.createElement("div", {
|
|
364
388
|
className: "".concat(RC, "__list-item ").concat(RC, "__list-item--no-options")
|
|
365
389
|
}, noOptionsText), disabled && isOpen && /*#__PURE__*/_react.default.createElement(_DropdownLoader.default, null));
|