chore: fix typo initTreeDate -> initTreeData (#29911)

This commit is contained in:
Guru Mahendran 2021-03-25 22:44:54 -04:00 committed by GitHub
parent 98ba4038c1
commit 7e6bfa4a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 => {