diff --git a/src/types/treeView.types.ts b/src/types/treeView.types.ts index 9104a84..d0056a0 100644 --- a/src/types/treeView.types.ts +++ b/src/types/treeView.types.ts @@ -17,14 +17,11 @@ export interface TreeNode { [key: string]: any; } -export interface __FlattenedTreeNode__ { - id: string; - name: string; - children?: TreeNode[]; +export interface __FlattenedTreeNode__ extends TreeNode { level?: number; - [key: string]: any; } +// Remove non-modifiable keys export type TreeFlatListProps = Omit< FlashListProps, "data" @@ -50,12 +47,6 @@ export interface TreeViewProps { type CheckboxProps = Omit; -export interface CheckBoxViewProps extends CheckBoxViewStyleProps { - value: CheckboxValueType; - onValueChange: (value: boolean) => void; - text: string; -} - export interface CheckBoxViewStyleProps { // Optional style modifiers outermostParentViewStyle?: StyleProp | {}; @@ -67,6 +58,12 @@ export interface CheckBoxViewStyleProps { textProps?: TextProps; } +export interface CheckBoxViewProps extends CheckBoxViewStyleProps { + value: CheckboxValueType; + onValueChange: (value: boolean) => void; + text: string; +} + export interface TreeViewRef { selectAll: () => void; unselectAll: () => void;