fix: make model provider title sticky in selector dropdown

Add sticky positioning to provider title rows so they remain visible
while scrolling through models. Remove top padding from list container
to prevent the first provider title from shifting up before sticking.
This commit is contained in:
yyh
2026-03-11 16:44:11 +08:00
parent ad4cb51983
commit aeaf6d2ce9
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ const PopupItem: FC<PopupItemProps> = ({
return (
<div className="mb-1">
<div className="flex h-[22px] items-center justify-between px-3 text-xs font-medium text-text-tertiary">
<div className="sticky top-12 z-[2] flex h-[22px] items-center justify-between bg-components-panel-bg px-3 text-xs font-medium text-text-tertiary">
<div
className="flex cursor-pointer items-center"
onClick={() => setCollapsed(prev => !prev)}

View File

@ -184,7 +184,7 @@ const Popup: FC<PopupProps> = ({
{showCreditsExhaustedAlert && (
<CreditsExhaustedAlert hasApiKeyFallback={hasApiKeyFallback} />
)}
<div className="p-1">
<div className="px-1 pb-1">
{
filteredModelList.map(model => (
<PopupItem