diff --git a/web-app/src/containers/ModelCombobox.tsx b/web-app/src/containers/ModelCombobox.tsx index 9b8144ed3..ea5b3d670 100644 --- a/web-app/src/containers/ModelCombobox.tsx +++ b/web-app/src/containers/ModelCombobox.tsx @@ -51,24 +51,10 @@ function useDropdownPosition(open: boolean, containerRef: React.RefObject void; t: (key: string) => string }) => ( +const ErrorSection = ({ error, t }: { error: string; t: (key: string) => string }) => (
{t('common:failedToLoadModels')} - {onRefresh && ( - - )}
{error}
@@ -83,11 +69,15 @@ const LoadingSection = ({ t }: { t: (key: string) => string }) => ( const EmptySection = ({ inputValue, t }: { inputValue: string; t: (key: string, options?: Record) => string }) => (
- {inputValue.trim() ? ( - {t('common:noModelsFoundFor', { searchValue: inputValue })} - ) : ( - {t('common:noModels')} - )} +
+
+ {inputValue.trim() ? ( + {t('common:noModelsFoundFor', { searchValue: inputValue })} + ) : ( + {t('common:noModels')} + )} +
+
) @@ -353,24 +343,46 @@ export function ModelCombobox({ onClick={handleInputClick} placeholder={placeholder} disabled={disabled} - className="pr-8" + className="pr-16" /> - {/* Dropdown trigger button */} - )} - + + {/* Custom dropdown rendered as portal */} {open && dropdownPosition.width > 0 && createPortal( @@ -390,7 +402,7 @@ export function ModelCombobox({ onWheel={(e) => e.stopPropagation()} > {/* Error state */} - {error && } + {error && } {/* Loading state */} {loading && }