fix: DetailPanel slide-in now visible — fixed empty content bug and positioning
- Only render DetailPanel when detail data is loaded (key={selectedId} forces remount
so internal activeTab state resets correctly)
- Override DetailPanel CSS with position:fixed to overlay on right side
(AppShell layout doesn't support detail prop from child pages)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -101,6 +101,15 @@
|
|||||||
background: var(--bg-hover);
|
background: var(--bg-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detailPanelOverride {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 100;
|
||||||
|
box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
.openDetailLink {
|
.openDetailLink {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|||||||
@@ -262,12 +262,16 @@ export default function Dashboard() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DetailPanel
|
{selectedId && detail && (
|
||||||
open={!!selectedId}
|
<DetailPanel
|
||||||
onClose={() => setSelectedId(null)}
|
key={selectedId}
|
||||||
title={selectedId ? `Exchange ${selectedId.slice(0, 12)}...` : ''}
|
open={true}
|
||||||
tabs={detailTabs}
|
onClose={() => setSelectedId(null)}
|
||||||
/>
|
title={`Exchange ${selectedId.slice(0, 12)}...`}
|
||||||
|
tabs={detailTabs}
|
||||||
|
className={styles.detailPanelOverride}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user