import React from 'react'; import { Tree } from 'antd'; import type { DataNode, TreeProps } from 'antd/es/tree'; const treeData: DataNode[] = [ { title: 'parent 1', key: '0-0', children: [ { title: 'parent 1-0', key: '0-0-0', disabled: true, children: [ { title: 'This is a very very very very long text', key: '0-0-0-0', disableCheckbox: true, }, { title: 'This is also a very very very very very long text', key: '0-0-0-1', }, ], }, { title: 'parent 1-1', key: '0-0-1', children: [{ title: sss, key: '0-0-1-0' }], }, ], }, ]; const App: React.FC = () => { const onSelect: TreeProps['onSelect'] = (selectedKeys, info) => { console.log('selected', selectedKeys, info); }; const onCheck: TreeProps['onCheck'] = (checkedKeys, info) => { console.log('onCheck', checkedKeys, info); }; return ( ); }; export default App;