mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
chore: fix typo initTreeDate -> initTreeData (#29911)
This commit is contained in:
parent
98ba4038c1
commit
7e6bfa4a8c
@ -24,7 +24,7 @@ interface DataNode {
|
||||
children?: DataNode[];
|
||||
}
|
||||
|
||||
const initTreeDate: DataNode[] = [
|
||||
const initTreeData: DataNode[] = [
|
||||
{ title: 'Expand to load', key: '0' },
|
||||
{ title: 'Expand to load', key: '1' },
|
||||
{ title: 'Tree Node', key: '2', isLeaf: true },
|
||||
@ -50,7 +50,7 @@ function updateTreeData(list: DataNode[], key: React.Key, children: DataNode[]):
|
||||
}
|
||||
|
||||
const Demo: React.FC<{}> = () => {
|
||||
const [treeData, setTreeData] = useState(initTreeDate);
|
||||
const [treeData, setTreeData] = useState(initTreeData);
|
||||
|
||||
function onLoadData({ key, children }: any) {
|
||||
return new Promise<void>(resolve => {
|
||||
|
Loading…
Reference in New Issue
Block a user