@thecb/components 9.4.0-beta.5 → 9.4.0-beta.6

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.
package/dist/index.cjs.js CHANGED
@@ -27554,11 +27554,13 @@ var SearchableSelect = function SearchableSelect(_ref) {
27554
27554
  itemList = _useState2[0],
27555
27555
  setItemList = _useState2[1];
27556
27556
 
27557
- var selectAllOption = {
27558
- name: SELECT_ALL,
27559
- value: SELECT_ALL
27560
- };
27561
- var completeOptionsList = [selectAllOption].concat(_toConsumableArray(itemList.sort(function (a, b) {
27557
+ var selectAllOption = items.find(function (item) {
27558
+ return item.name === SELECT_ALL;
27559
+ }); // { name: SELECT_ALL, value: SELECT_ALL };
27560
+
27561
+ var completeOptionsList = [_objectSpread2({}, selectAllOption || {})].concat(_toConsumableArray(itemList.filter(function (item) {
27562
+ return item.name !== SELECT_ALL;
27563
+ }).sort(function (a, b) {
27562
27564
  return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
27563
27565
  })));
27564
27566
  React.useEffect(function () {