@thecb/components 9.4.0-beta.6 → 9.4.0

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.esm.js CHANGED
@@ -27546,15 +27546,9 @@ var SearchableSelect = function SearchableSelect(_ref) {
27546
27546
  itemList = _useState2[0],
27547
27547
  setItemList = _useState2[1];
27548
27548
 
27549
- var selectAllOption = items.find(function (item) {
27550
- return item.name === SELECT_ALL;
27551
- }); // { name: SELECT_ALL, value: SELECT_ALL };
27552
-
27553
- var completeOptionsList = [_objectSpread2({}, selectAllOption || {})].concat(_toConsumableArray(itemList.filter(function (item) {
27554
- return item.name !== SELECT_ALL;
27555
- }).sort(function (a, b) {
27556
- return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
27557
- })));
27549
+ var completeOptionsList = itemList.sort(function (a, b) {
27550
+ return a.name == SELECT_ALL ? -1 : b.name === SELECT_ALL ? 1 : a.name.toLowerCase().localeCompare(b.name.toLowerCase());
27551
+ });
27558
27552
  useEffect$1(function () {
27559
27553
  return setItemList(items);
27560
27554
  }, [items, selectedItems]);