react-component / react-component/tree-select
希望 TreeSelect 提供 API,支持设置鼠标 hover 输入框时显示的内容
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 312
- Forks
- 204
- Avg merge
- 37m
- Merged PRs (30d)
- 1
Description
问题描述
- 在选择值后,鼠标 hover 输入框,显示的 title 可以自定义。目前 title 和 传入的JSON 数据中的 title 字段是一致的,且不支持修改。

期望的行为
- 希望可以新增 API (如:tipsField),支持设置 title 对应的字段,假如我传入的 treeData 如下所示:
const treeData = [
{
title: 'Node1',
value: '0-0',
key: '0-0',
code: 'a1',
children: [
{
title: 'Child Node1',
value: '0-0-1',
key: '0-0-1',
code: 'a2'
},
{
title: 'Child Node2',
value: '0-0-2',
key: '0-0-2',
code: 'a3'
},
],
},
{
title: 'Node2',
value: '0-1',
key: '0-1',
code: 'a4'
},
];
那么当我设置 tipsField="code" 的时候,应该把鼠标 hover 显示的内容,显示为 code 字段对应的值。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TreeSelect rendering path for the input's hover title and the handling of treeData fields. Review how the requested tipsField API would fit the existing component behavior, then add coverage showing that hover text uses the selected field while existing title behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100