ant-design / ant-design/pro-components

🐛[BUG]ProTable search回显错误

Open
#8,660 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

### 🐛 bug 描述

将 ProTable 的search.filterType 改为 light.
1. 级联选择器、树形选择器 选择值之后不会自动关闭选项
![image](https://github.com/user-attachments/assets/b4add1b4-991d-41a3-ad89-d1c09914ad95)

2. 级联选择器、树形选择器 选择值之后 回显的为 value,并不是 对应的 label
![image](https://github.com/user-attachments/assets/4395ca17-7269-4b84-9adc-9e7881dc6df1)

### 📷 复现步骤

https://codesandbox.io/s/cool-gauss-c2hv8y?file=/App.tsx:3425-3444

### 🏞 期望结果

1. 级联选择器、树形选择器 选择值之后自动关闭选项
2. 级联选择器、树形选择器 选择值之后回显对应的 label

### 💻 复现代码

https://procomponents.ant.design/components/table?tab=api¤t=1&pageSize=5#valuetype---%E9%80%89%E6%8B%A9%E7%B1%BB

就是官网例子,将 search.filterType 改为 light 即可

### © 版本信息

- ProComponents 版本: [e.g. 4.0.0]
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox and the ProTable documentation example, changing search.filterType to light to reproduce both selector behaviors. Trace the ProTable search handling for cascade and tree selectors; done means selections close automatically and display their labels rather than values.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.