Rebuild picker bundles with collapsed groups
This commit is contained in:
Vendored
+3
-3
@@ -501,7 +501,7 @@ function safeEntryParts(entryName) {
|
||||
return parts;
|
||||
}
|
||||
function node(kind, name, path, children = [], file = null) {
|
||||
return { id: crypto.randomUUID(), kind, name, path, children, file, expanded: true };
|
||||
return { id: crypto.randomUUID(), kind, name, path, children, file, expanded: kind === "file" };
|
||||
}
|
||||
function addPath(root, parts, fileNode) {
|
||||
let current = root;
|
||||
@@ -745,7 +745,7 @@ function onFolderChange(state, cfg, elements) {
|
||||
name: rootName,
|
||||
path: rootName,
|
||||
children: [],
|
||||
expanded: true
|
||||
expanded: false
|
||||
});
|
||||
}
|
||||
const root = roots.get(rootName);
|
||||
@@ -762,7 +762,7 @@ function onFolderChange(state, cfg, elements) {
|
||||
name: part,
|
||||
path: `${rootName}/${nodeParts.slice(0, index + 1).join("/")}`,
|
||||
children: [],
|
||||
expanded: true
|
||||
expanded: false
|
||||
};
|
||||
current.children.push(child);
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -529,7 +529,7 @@ var FilePicker = (() => {
|
||||
return parts;
|
||||
}
|
||||
function node(kind, name, path, children = [], file = null) {
|
||||
return { id: crypto.randomUUID(), kind, name, path, children, file, expanded: true };
|
||||
return { id: crypto.randomUUID(), kind, name, path, children, file, expanded: kind === "file" };
|
||||
}
|
||||
function addPath(root, parts, fileNode) {
|
||||
let current = root;
|
||||
@@ -773,7 +773,7 @@ var FilePicker = (() => {
|
||||
name: rootName,
|
||||
path: rootName,
|
||||
children: [],
|
||||
expanded: true
|
||||
expanded: false
|
||||
});
|
||||
}
|
||||
const root = roots.get(rootName);
|
||||
@@ -790,7 +790,7 @@ var FilePicker = (() => {
|
||||
name: part,
|
||||
path: `${rootName}/${nodeParts.slice(0, index + 1).join("/")}`,
|
||||
children: [],
|
||||
expanded: true
|
||||
expanded: false
|
||||
};
|
||||
current.children.push(child);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user