ant-design / ant-design/pro-components

🐛[BUG]<ProFormSelect/> 组件打开搜索远程获取数据,获得搜索结果后,点击其中一个,会清空结果,然后触发 request,resetAfterSelect无效

Open
#7,768 1 comment 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 描述

组件打开搜索远程获取数据,获得搜索结果后,点击其中一个,会清空结果,然后触发 request,resetAfterSelect无效

### 📷 复现步骤

1.输入搜索,获得下拉菜单
2.点击其中一个
3.搜索结果清空,除非request

### 🏞 期望结果

与antd 的一样效果,获得搜索结果后,没有重新输入新搜索字段的情况下,保留上一次搜索结果,可重复选择

### 💻 复现代码

### © 版本信息

- ProComponents 版本: 2.6.28

### 🚑 其他信息

![image](https://github.com/ant-design/pro-components/assets/12912875/cf08e485-d130-4782-8265-7d8c839c4d10)

Contributor guide

Open the contributing guide

Research direction

Start at the ProFormSelect component and its remote-search request handling. Reproduce the issue by searching, selecting a result, and checking whether the dropdown is cleared and request runs again. Done means the previous results remain available for repeated selection, matching Ant Design Select behavior, and resetAfterSelect works.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.