Refactor to apply global navigation actions
[arvados-workbench2.git] / src / store / tree-picker / tree-picker.ts
index c815ad4f900468ed74f2bd0b33d062e5e377f219..fd104fe4b25695624c6ee771aa14f44a4921bb93 100644 (file)
@@ -4,6 +4,7 @@
 
 import { Tree } from "~/models/tree";
 import { TreeItemStatus } from "~/components/tree/tree";
+import { RootState } from '~/store/store';
 
 export type TreePicker = { [key: string]: Tree<TreePickerNode> };
 
@@ -21,3 +22,5 @@ export const createTreePickerNode = (data: { nodeId: string, value: any }) => ({
     collapsed: true,
     status: TreeItemStatus.INITIAL
 });
+
+export const getTreePicker = (id: string) => (state: TreePicker): Tree<TreePickerNode> | undefined => state[id];
\ No newline at end of file