-
-
+
+ {(loading === "FETCHING_COLLECTION_ITEMS" ||
+ !isEmpty(collectionItems) ||
+ (isSearching && isEmpty(collectionItems))) && (
+
+ {loading === "FETCHING_COLLECTION_ITEMS" ? (
+
+ ) : isSearching && isEmpty(collectionItems) ? (
+
+ {t("No results found for")} "{searchQuery}"
+
+ ) : (
+
+ {map(collectionItems?.slice(0, 20), (item, index) => (
+ - handleSelect(item)}
+ className={`cursor-pointer p-2 text-xs ${
+ formData?.href?.includes(item.id)
+ ? "bg-blue-200"
+ : index === selectedIndex
+ ? "bg-gray-100"
+ : "hover:bg-gray-100"
+ }`}>
+ {item.name} {item.slug && ( {item.slug} )}
+
+ ))}
+
+ )}
- ) : (
- !isEmpty(collectionItems) && (
-
- {map(collectionItems?.slice(0, 20), (item) => (
- - handleSelect(item)}
- className={`cursor-pointer p-2 text-xs ${formData?.href?.includes(item.id) ? "bg-blue-200" : "hover:bg-gray-100"}`}>
- {item.name} {item.slug && ( {item.slug} )}
-
- ))}
-
- )
)}
);