Show all draft picks in sidebar with scroll instead of last 10 (#33)
- Remove 10-pick limit in SidebarRecentPicks - Fix scroll by using max-h-[45vh] on AccordionContent instead of the broken flex-1 approach (AccordionPrimitive.Content has overflow-hidden hardcoded, making flex-1 and overflow-y-auto ineffective without a bounded height) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
da70bf36f1
commit
fd46e4f0b5
3 changed files with 5 additions and 6 deletions
|
|
@ -86,11 +86,11 @@ export function DraftSidebar({
|
|||
</AccordionItem>
|
||||
|
||||
{/* Recent Picks Section */}
|
||||
<AccordionItem value="recent-picks" className="border-0 flex-1 overflow-hidden flex flex-col">
|
||||
<AccordionTrigger className="px-4 py-3 hover:no-underline bg-muted/50 hover:bg-muted flex-shrink-0">
|
||||
<h2 className="font-semibold text-sm">Recent Picks</h2>
|
||||
<AccordionItem value="recent-picks" className="border-0">
|
||||
<AccordionTrigger className="px-4 py-3 hover:no-underline bg-muted/50 hover:bg-muted">
|
||||
<h2 className="font-semibold text-sm">Picks</h2>
|
||||
</AccordionTrigger>
|
||||
<AccordionContent className="pb-0 flex-1 overflow-y-auto">
|
||||
<AccordionContent className="pb-0 overflow-y-auto max-h-[45vh]">
|
||||
{recentPicksSection}
|
||||
</AccordionContent>
|
||||
</AccordionItem>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ export function SidebarRecentPicks({ picks }: SidebarRecentPicksProps) {
|
|||
{picks
|
||||
.slice()
|
||||
.reverse()
|
||||
.slice(0, 10)
|
||||
.map((pick) => (
|
||||
<div
|
||||
key={pick.id}
|
||||
|
|
|
|||
|
|
@ -1263,7 +1263,7 @@ export default function DraftRoom() {
|
|||
)}
|
||||
|
||||
<section>
|
||||
<h2 className="font-semibold text-sm mb-2">Recent Picks</h2>
|
||||
<h2 className="font-semibold text-sm mb-2">Picks</h2>
|
||||
<SidebarRecentPicks picks={picks} />
|
||||
</section>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue