ant-design / ant-design/pro-components

ProFormSelect 设置 optionFilterProp 无效

Open
#8,847 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

### 🐛 bug 描述

ProFormSelect 目前通过 label、value 都可以筛选出数据,但是我只想通过label筛选,通过设置optionFilterProp,没有效果

### 📷 复现步骤

### 🏞 期望结果

只通过 label 筛选出数据

### 💻 复现代码

![2](https://github.com/user-attachments/assets/7ebabb7a-d88f-458f-8c94-83dea6bc2b43)
![1](https://github.com/user-attachments/assets/0b8b2501-2e0b-4db7-86fd-198949f3cf2e)

### © 版本信息

- ProComponents 版本: 2.8.1
- umi 版本:@umijs/max 4.3.27
- 浏览器环境:谷歌
- 开发环境:mac OS

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start by locating the ProFormSelect implementation and tracing how optionFilterProp is passed to the underlying select. Reproduce the reported behavior using the attached examples and verify that setting optionFilterProp to label prevents value-based filtering. Done means the expected label-only filtering works and is covered by an appropriate regression test.

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.