Skip to content

Commit e2da1ce

Browse files
authored
šŸ› adds missing constraint for TreeDataType (#636)
Solves #629
1 parent 5635072 commit e2da1ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ā€Žsrc/NodeList.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import * as React from 'react';
66
import VirtualList, { ListRef } from 'rc-virtual-list';
7-
import { FlattenNode, Key, DataEntity, DataNode, ScrollTo } from './interface';
7+
import { BasicDataNode, FlattenNode, Key, DataEntity, DataNode, ScrollTo } from './interface';
88
import MotionTreeNode from './MotionTreeNode';
99
import { findExpandedKeys, getExpandRange } from './utils/diffUtil';
1010
import { getTreeNodeProps, getKey } from './utils/treeUtil';
@@ -54,7 +54,7 @@ export interface NodeListRef {
5454
getIndentWidth: () => number;
5555
}
5656

57-
interface NodeListProps<TreeDataType> {
57+
interface NodeListProps<TreeDataType extends BasicDataNode> {
5858
prefixCls: string;
5959
style: React.CSSProperties;
6060
data: FlattenNode<TreeDataType>[];

0 commit comments

Comments
Ā (0)