@@ -2857,23 +2857,19 @@ export const RelatedList: React.FC<RelatedListProps> = ({
28572857 aria-busy = { pendingRows > 0 || undefined }
28582858 >
28592859 < div
2860- className = { cn ( ' group/panel-head flex h-9 items-center gap-1.5 px-3 text-[12.5px] font-semibold' , open && 'cursor-pointer' ) }
2860+ className = " group/panel-head relative flex h-9 items-center gap-1.5 px-3 text-[12.5px] font-semibold"
28612861 data-related-panel-head = ""
2862- // The row is the target: a click on its free space opens the list
2863- // too. Its own controls stop their clicks; a click inside the ⋯
2864- // menu's portaled content bubbles here through React yet lands
2865- // outside the row in the DOM, and is not the row's.
2866- onClick = { open ? ( event ) => {
2867- if ( event . currentTarget . contains ( event . target as Node ) ) open ( ) ;
2868- } : undefined }
28692862 >
28702863 { open ? (
2864+ // The row is the target: the button's ::after stretches over the
2865+ // whole header, so a click on its free space opens the list too,
2866+ // and the row stays one control. The controls sit above it.
28712867 < button
28722868 type = "button"
2873- className = "flex min-w-0 items-center gap-1.5 rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
2869+ className = "flex min-w-0 cursor-pointer items-center gap-1.5 rounded-sm text-left after:absolute after:inset-0 after:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
28742870 title = { viewAll }
28752871 data-related-panel-open = ""
2876- onClick = { ( e ) => { e . stopPropagation ( ) ; open ( ) ; } }
2872+ onClick = { ( ) => open ( ) }
28772873 >
28782874 < span className = { cn ( 'min-w-0 truncate' , isEmpty && 'text-muted-foreground font-medium' ) } > { title } </ span >
28792875 { countChip }
@@ -2896,7 +2892,7 @@ export const RelatedList: React.FC<RelatedListProps> = ({
28962892 { /* Drawn on hover or focus, and while the ⋯ menu is open: its
28972893 content is portaled, so neither holds there. */ }
28982894 < span
2899- className = "ml-auto flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover/panel-head:opacity-100 group-focus-within/panel-head:opacity-100 has-[[data-state=open]]:opacity-100 [@media(hover:none)]:opacity-100"
2895+ className = "relative z-10 ml-auto flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover/panel-head:opacity-100 group-focus-within/panel-head:opacity-100 has-[[data-state=open]]:opacity-100 [@media(hover:none)]:opacity-100"
29002896 data-related-panel-controls = ""
29012897 >
29022898 { cardChrome && < RelatedPanelHandle chrome = { cardChrome } title = { title } /> }
0 commit comments