From ef9aa897508a656b3eb71dde3cccacf72a5f51a1 Mon Sep 17 00:00:00 2001 From: Piotr Monwid-Olechnowicz Date: Thu, 17 Oct 2024 16:47:33 +0200 Subject: [PATCH] chore(docs): fix a bug in sidenav --- packages/docs/src/components/sidenav.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/docs/src/components/sidenav.tsx b/packages/docs/src/components/sidenav.tsx index 3982fa0fb..b360b67cb 100644 --- a/packages/docs/src/components/sidenav.tsx +++ b/packages/docs/src/components/sidenav.tsx @@ -123,7 +123,9 @@ export const AccordionButton = (props: { onClick: EventHandler> }) => { const transform = props.open ? 'rotate(-180 8 8)' : 'rotate(0 8 8)' - const disabled = props.pathname ? props.pathname === props.href : false + const disabled = props.pathname + ? props.href.startsWith(props.pathname) + : false return (