projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '16111-ssh-help' refs #16111
[arvados-workbench2.git]
/
src
/
models
/
tree.ts
diff --git
a/src/models/tree.ts
b/src/models/tree.ts
index bec2f758a478335e6ef437afe6592dde144ce729..de2f7b71a1b6861ccd6af42e262f652d8e7d67b0 100644
(file)
--- a/
src/models/tree.ts
+++ b/
src/models/tree.ts
@@
-27,7
+27,8
@@
export enum TreeNodeStatus {
export enum TreePickerId {
PROJECTS = 'Projects',
SHARED_WITH_ME = 'Shared with me',
export enum TreePickerId {
PROJECTS = 'Projects',
SHARED_WITH_ME = 'Shared with me',
- FAVORITES = 'Favorites'
+ FAVORITES = 'Favorites',
+ PUBLIC_FAVORITES = 'Public Favorites'
}
export const createTree = <T>(): Tree<T> => ({});
}
export const createTree = <T>(): Tree<T> => ({});
@@
-237,6
+238,9
@@
const getRootNodeChildrenIds = <T>(tree: Tree<T>) =>
const addChild = (parentId: string, childId: string) => <T>(tree: Tree<T>): Tree<T> => {
const addChild = (parentId: string, childId: string) => <T>(tree: Tree<T>): Tree<T> => {
+ if (childId === "") {
+ return tree;
+ }
const node = getNode(parentId)(tree);
if (node) {
const children = node.children.some(id => id === childId)
const node = getNode(parentId)(tree);
if (node) {
const children = node.children.some(id => id === childId)