Skip to content

Commit ddda9f4

Browse files
committed
Page Tree now remembers collapseAll and expandAll
1 parent b97ed4f commit ddda9f4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

resources/js/components/structures/PageTree.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,16 @@ export default {
320320
321321
expandAll() {
322322
this.$refs.tree.openAll();
323+
this.collapsedState = [];
323324
},
324325
325326
collapseAll() {
326327
this.$refs.tree.closeAll();
328+
// Get all node IDs to mark them as collapsed
329+
this.collapsedState = [];
330+
walkTreeData(this.treeData, (node) => {
331+
this.collapsedState.push(node.id);
332+
});
327333
},
328334
329335
getNodeByBranchId(id) {

0 commit comments

Comments
 (0)