+ {suggestionsError && showErrors ? (
+
+ {errorMessage}
+
+ ) : (
+ actualSuggestions.map((item, index) => {
+ const completedPath = getCompletedPath(item);
+ const isSelected = index === selectedIndex;
+ const lastFragment = getLastFragment(item.path);
+
+ const handleMouseDown = (event: MouseEvent
) => {
+ handleInputChange(completedPath);
+ event.preventDefault();
+ };
+
+ return (
+
+ {item.icon ?? (
+
+ )}
+
+ {lastFragment ? `\u2026/${lastFragment}` : item.path}
+
+
+ );
+ })
+ )}
+
+