export type TreePicker = { [key: string]: Tree<TreePickerNode> };
-export interface TreePickerNode {
+export interface TreePickerNode<Value = any> {
nodeId: string;
- value: any;
+ value: Value;
selected: boolean;
collapsed: boolean;
status: TreeItemStatus;
collapsed: true,
status: TreeItemStatus.INITIAL
});
+
+export const getTreePicker = <Value = {}>(id: string) => (state: TreePicker): Tree<TreePickerNode<Value>> | undefined => state[id];
\ No newline at end of file