Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

Add watcher to handle dynamic section changes in SideBar component

copilot-swe-agent[bot]075970b293cc
diff --git a/src/components/Workspace/SideBar.vue b/src/components/Workspace/SideBar.vue
index 213c447c..e312f326 100644
--- a/src/components/Workspace/SideBar.vue
+++ b/src/components/Workspace/SideBar.vue
@@ -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,