From f912df08fcf53404c2157cbd95f3e6c89409b365 Mon Sep 17 00:00:00 2001 From: Gabriel Dugny Date: Tue, 16 Sep 2025 10:25:10 +0200 Subject: [PATCH] chore: Clean techdocs-module-addons-contrib ExpandableNavigation Co-authored-by: Mark Avery Signed-off-by: Gabriel Dugny Signed-off-by: Gabriel Dugny --- .../src/ExpandableNavigation/ExpandableNavigation.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/plugins/techdocs-module-addons-contrib/src/ExpandableNavigation/ExpandableNavigation.tsx b/plugins/techdocs-module-addons-contrib/src/ExpandableNavigation/ExpandableNavigation.tsx index a9dccb1f12..2a18e642fa 100644 --- a/plugins/techdocs-module-addons-contrib/src/ExpandableNavigation/ExpandableNavigation.tsx +++ b/plugins/techdocs-module-addons-contrib/src/ExpandableNavigation/ExpandableNavigation.tsx @@ -92,15 +92,7 @@ export const ExpandableNavigationAddon = () => { useEffect(() => { if (!checkboxToggles?.length) return; function shouldToggle(item: HTMLInputElement) { - const isExpanded = item.checked; - const shouldExpand = expanded?.expandAllNestedNavs; - if (shouldExpand && !isExpanded) { - return true; - } - if (!shouldExpand && isExpanded) { - return true; - } - return false; + return expanded?.expandAllNestedNavs !== item.checked; } for (const item of checkboxToggles) { if (shouldToggle(item)) {