ant-design / ant-design/pro-components

🐛[BUG] ProTable的高级筛选栏在search的filterType是light时,选中部分选项后点击renderFormItem底部清除后,无法选择option

Open
#8,410 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 描述

ProTable的高级筛选栏在search的filterType是light时,renderFormItem是Select组件并开启多选模式,在选择多个option后,点击底部清除按钮,然后再次点击option,无法选中。

### 📷 复现步骤

https://codesandbox.io/p/sandbox/cha-xun-biao-ge-forked-r2m4wd?file=%2FApp.tsx%3A68%2C18

打开上面链接
加载完成后,点击筛选栏中的“状态”,会弹出一个Select组件
选择两个选项,然后点击左下角的“清除”按钮,正常清空,然后再点击option就点不动了。

备注:Select组件自带的clear按钮是能清除后还能正常使用

### 🏞 期望结果

1. 点击清除按钮还能正常使用Select
2. 提供一种方式能让search的filterType,使用 renderFormItem的时候,能自定义底部按钮。比如怎么隐藏ProTable提供的LightFilter组件中其中一个表单项里的DropdownFooter。
![image](https://github.com/ant-design/pro-components/assets/111114334/6bec3c95-3f01-44da-ab2c-2969c2230f72)

### 💻 复现代码

https://codesandbox.io/p/sandbox/cha-xun-biao-ge-forked-r2m4wd?file=%2FApp.tsx%3A68%2C18

### © 版本信息

- ProComponents 版本: 2.7.1
- 浏览器环境 chrome 122
- 开发环境 macOS

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction and trace ProTable's light filter flow when renderFormItem returns a multi-select. Compare the built-in Select clear button with the LightFilter footer's clear action; done means options can be selected again after clearing, while the requested footer customization remains a separate consideration.

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.