@@ -607,9 +607,9 @@ const ProcessRow = React.memo(function ProcessRow({
607607 onSelect : ( pid : number ) => void ;
608608 onContextMenu : ( pid : number , e : React . MouseEvent ) => void ;
609609} ) {
610+ const cols = getColumns ( platform ) ;
611+ const visibleKeys = new Set ( cols . map ( ( c ) => c . key ) ) ;
610612 const gridTemplate = getGridTemplate ( platform ) ;
611- const showStatus = platform !== "windows" && platform !== "darwin" ;
612- const showThreads = platform !== "windows" ;
613613 if ( proc . gone ) {
614614 return (
615615 < div
@@ -622,9 +622,9 @@ const ProcessRow = React.memo(function ProcessRow({
622622 { proc . pid }
623623 </ div >
624624 < div className = "px-2 flex items-center truncate text-muted italic" > (gone)</ div >
625- { showStatus && < div className = "px-2 flex items-center truncate" /> }
626- < div className = "px-2 flex items-center truncate" />
627- { showThreads && < div className = "px-2 flex items-center truncate" /> }
625+ { visibleKeys . has ( "status" ) && < div className = "px-2 flex items-center truncate" /> }
626+ { visibleKeys . has ( "user" ) && < div className = "px-2 flex items-center truncate" /> }
627+ { visibleKeys . has ( "threads" ) && < div className = "px-2 flex items-center truncate" /> }
628628 < div className = "px-2 flex items-center truncate" />
629629 < div className = "px-2 flex items-center truncate" />
630630 </ div >
@@ -641,11 +641,13 @@ const ProcessRow = React.memo(function ProcessRow({
641641 { proc . pid }
642642 </ div >
643643 < div className = "px-2 flex items-center truncate" > { proc . command } </ div >
644- { showStatus && (
644+ { visibleKeys . has ( "status" ) && (
645645 < div className = "px-2 flex items-center truncate text-secondary text-[11px]" > { proc . status } </ div >
646646 ) }
647- < div className = "px-2 flex items-center truncate text-secondary" > { proc . user } </ div >
648- { showThreads && (
647+ { visibleKeys . has ( "user" ) && (
648+ < div className = "px-2 flex items-center truncate text-secondary" > { proc . user } </ div >
649+ ) }
650+ { visibleKeys . has ( "threads" ) && (
649651 < div className = "px-2 flex items-center truncate justify-end text-secondary font-mono text-[11px]" >
650652 { proc . numthreads === - 1 ? "-" : proc . numthreads >= 1 ? proc . numthreads : "" }
651653 </ div >
0 commit comments