Open
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
4.2.6
Environment
mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/128.0.0.0 safari/537.36
Reproduction link
https://www.antdv.com/components/tree-cn#api
Steps to reproduce
它必须需要一个 key
字段,复现demo
但是我用 fieldNames
指定替换了它的 key
为 id
,
const fieldNames: TreeProps['fieldNames'] = {
children: 'child',
title: 'name',
key:'id'
};
What is expected?
不报ts类型错误
What is actually happening?
报数据类型不符合TreeProps['treeData'] 错误,缺少 key 属性
Metadata
Metadata
Assignees
Labels
No labels