@@ -86,7 +86,7 @@ export function ContentOutline({ scroller, panelId }: { scroller: HTMLElement |
|
||||
return childTop && childTop >= offsetTop;
|
||||
});
|
||||
|
||||
if (activeChild) {
|
||||
if (activeChild && isCollapsible(item)) {
|
||||
setActiveSectionChildId(activeChild.id);
|
||||
setActiveSectionId(item.id);
|
||||
break;
|
||||
@@ -95,6 +95,10 @@ export function ContentOutline({ scroller, panelId }: { scroller: HTMLElement |
|
||||
if (activeItem) {
|
||||
setActiveSectionId(activeItem.id);
|
||||
setActiveSectionChildId(undefined);
|
||||
setSectionsExpanded((prev) => ({
|
||||
...prev,
|
||||
[item.id]: false,
|
||||
}));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user