feat: add Sidebar onNavigate callback and DataTable fillHeight prop
All checks were successful
Build & Publish / publish (push) Successful in 1m3s
All checks were successful
Build & Publish / publish (push) Successful in 1m3s
Sidebar: add optional onNavigate prop so consuming apps can intercept and remap navigation paths instead of relying on internal React Router links. DataTable: add fillHeight prop for flex-fill layouts with scrolling body. Make the table header sticky by default so it stays visible during vertical scroll. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,7 @@ export interface SidebarTreeProps {
|
||||
filterQuery?: string
|
||||
persistKey?: string // sessionStorage key to persist expand state across remounts
|
||||
autoRevealPath?: string | null // when set, auto-expand the parent of the matching node
|
||||
onNavigate?: (path: string) => void
|
||||
}
|
||||
|
||||
// ── Star icons ───────────────────────────────────────────────────────────────
|
||||
@@ -134,8 +135,10 @@ export function SidebarTree({
|
||||
filterQuery,
|
||||
persistKey,
|
||||
autoRevealPath,
|
||||
onNavigate,
|
||||
}: SidebarTreeProps) {
|
||||
const navigate = useNavigate()
|
||||
const routerNavigate = useNavigate()
|
||||
const navigate = onNavigate ?? routerNavigate
|
||||
|
||||
// Expand/collapse state — optionally persisted to sessionStorage
|
||||
const [userExpandedIds, setUserExpandedIds] = useState<Set<string>>(
|
||||
|
||||
Reference in New Issue
Block a user