mirror of
https://github.com/langgenius/dify.git
synced 2026-03-21 06:18:27 +08:00
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:
@ -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)}
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user