If you want to update the title, simply convert it to a DOM element.
title: <>leaf1-nonTooltips</>
import React from 'react';
import { Tree } from 'antd';
import type { TreeDataNode } from 'antd';
const treeData: TreeDataNode[] = [
{
title: 'parent 1-0',
key: '0-0-0',
disabled: true,
children: [
{
title: <>leaf1-nonTooltips</>,
key: '0-0-0-0',
disableCheckbox: true,
},
{
title: 'leaf2-tooltips',
key: '0-0-0-1',
},
],
},
];
const App: React.FC = () => {
return <Tree defaultExpandAll treeData={treeData} />;
};
export default App;