Add watcher to handle dynamic section changes in SideBar component

Co-authored-by: JDB321Sailor <212125521+JDB321Sailor@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-12-29 13:05:38 +00:00
parent 4bde34c3b1
commit 075970b293

View file

@ -59,6 +59,17 @@ export default {
});
},
},
watch: {
/* Update isOpen array when filtered sections change */
filteredSections(newSections) {
// Resize isOpen array if needed
const currentLength = this.isOpen.length;
const newLength = newSections.length;
if (newLength !== currentLength) {
this.isOpen = new Array(newLength).fill(false);
}
},
},
components: {
SideBarItem,
SideBarSection,