fix: first exchange click doesn't highlight selected row
On first click, Dashboard was in non-split mode. The click set selectedId locally then triggered split view, which remounted Dashboard — losing the selectedId state. Added activeExchangeId prop passed from ExchangesPage so the selection survives the remount. Also syncs via useEffect when parent changes selection (e.g. correlated exchange navigation). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -102,7 +102,7 @@ export default function ExchangesPage() {
|
||||
const showSplit = !!selected || !!scopedRouteId;
|
||||
|
||||
if (!showSplit) {
|
||||
return <Dashboard onExchangeSelect={handleExchangeSelect} />;
|
||||
return <Dashboard onExchangeSelect={handleExchangeSelect} activeExchangeId={selected?.executionId} />;
|
||||
}
|
||||
|
||||
// Determine what the right panel shows
|
||||
@@ -113,7 +113,7 @@ export default function ExchangesPage() {
|
||||
return (
|
||||
<div ref={containerRef} className={styles.splitView}>
|
||||
<div className={styles.leftPanel} style={{ width: `${splitPercent}%` }}>
|
||||
<Dashboard onExchangeSelect={handleExchangeSelect} />
|
||||
<Dashboard onExchangeSelect={handleExchangeSelect} activeExchangeId={selected?.executionId} />
|
||||
</div>
|
||||
<div className={styles.splitter} onPointerDown={handleSplitterDown} />
|
||||
<div className={styles.rightPanel} style={{ width: `${100 - splitPercent}%` }}>
|
||||
|
||||
Reference in New Issue
Block a user