alibaba / alibaba/formily

[Feature Request] [formily/antd][PreviewText.TreeSelect] 大数据模式下,需要进行展示优化

Open
#3,952 2 comments 0 reactions 0 assignees View on GitHub
welcome pr
Dominant language
TypeScript
Stars
12.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

- [x] I have searched the [issues](https://github.com/alibaba/formily/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
大数据情况下,PreviewText.TreeSelect展示标签过多,会造成以下问题。
- 标签占用空间太大
- 加载过多dom造成性能卡顿
- 暂无数据时,展示的是带tag的样式
#### 个人建议解决方案如下
- 给定高度滚动,并且使用虚拟滚动
- 采取antd treeSelect属性,maxTagConut: 'responsive'
- 暂无数据时,期望Provide传什么展示什么
![6cbc0389-9d1a-41df-bfd4-17e856b16a03](https://github.com/alibaba/formily/assets/43233310/c6aef6e3-acde-4de3-bd7a-a51ea8204453)
![image](https://github.com/alibaba/formily/assets/43233310/2939369d-d561-4dab-b0fe-e2203d6cddd2)

### What does the proposed API look like?
PreviewText.TreeSelect
1. maxHeight,默认虚拟滚动
componentProps: {
maxHeight: '300px',
}
2. maxTagConut
componentProps: {
maxTagConut: 'responsive'
}

Contributor guide

Open the contributing guide

Research direction

Start at the PreviewText.TreeSelect implementation and inspect how its componentProps are handled. Compare the requested maxHeight, virtual scrolling, responsive maxTagConut behavior, and empty-state rendering with the current output; done means large selections remain usable and empty values display the provided content.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.