Explore (bugfix): Expanded section state (#86594)

Fix
This commit is contained in:
Haris Rozajac 2024-04-22 12:47:05 +02:00 committed by GitHub
parent 54290f2ac4
commit a10dcf9661
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}
}