Browse Source

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

pull/29921/head
Guru Mahendran 4 years ago
committed by GitHub
parent
commit
7e6bfa4a8c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/tree/demo/dynamic.md

4
components/tree/demo/dynamic.md

@ -24,7 +24,7 @@ interface DataNode {
children?: DataNode[]; children?: DataNode[];
} }
const initTreeDate: DataNode[] = [ const initTreeData: DataNode[] = [
{ title: 'Expand to load', key: '0' }, { title: 'Expand to load', key: '0' },
{ title: 'Expand to load', key: '1' }, { title: 'Expand to load', key: '1' },
{ title: 'Tree Node', key: '2', isLeaf: true }, { 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 Demo: React.FC<{}> = () => {
const [treeData, setTreeData] = useState(initTreeDate); const [treeData, setTreeData] = useState(initTreeData);
function onLoadData({ key, children }: any) { function onLoadData({ key, children }: any) {
return new Promise<void>(resolve => { return new Promise<void>(resolve => {

Loading…
Cancel
Save