Commit 7fc4775d authored by Joel's avatar Joel

fix: handle pin list max height

parent 9af05a3f
......@@ -129,12 +129,12 @@ const Sidebar: FC<ISidebarProps> = ({
</div>
)}
{/* unpinned list */}
<div className={cn('mt-4 px-4', !hasPinned && 'flex flex-col flex-grow')}>
<div className={cn('grow flex flex-col mt-4 px-4', !hasPinned && 'flex flex-col flex-grow')}>
{(hasPinned && list.length > 0) && (
<div className='mb-1.5 leading-[18px] text-xs text-gray-500 font-medium uppercase'>{t('share.chat.unpinnedTitle')}</div>
)}
<List
className={cn(hasPinned ? maxListHeight : 'flex-grow')}
className={cn('flex-grow h-0')}
currentId={currentId}
onCurrentIdChange={onCurrentIdChange}
list={list}
......
......@@ -75,7 +75,7 @@ const List: FC<IListProps> = ({
return (
<nav
ref={listRef}
className={cn(className, 'shrink-0 space-y-1 bg-white overflow-y-auto')}
className={cn(className, 'shrink-0 space-y-1 bg-white overflow-y-auto overflow-x-hidden')}
>
{list.map((item) => {
const isCurrent = item.id === currentId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment