ant-design / ant-design/pro-components

🐛[BUG]LightFilter中ProFormFieldSet如果点击了清除按钮,整个组件会坏掉

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

在 LightFilter中使用ProFormFieldSet包裹自定义组件时,在输入一个值后,如果点击清除的 X 图标后,输入新值无法生效。

### 📷 复现步骤

1. 点击字段
2. 输入任意值后点击确定
3. 点击字段右侧的X 图标
4. 再次点击字段输入值
5. 点击确定
6. 输入值未生效

### 🏞 期望结果

输入的新值能够生效。

### 💻 复现代码

https://codesandbox.io/p/sandbox/ji-ben-shi-yong-forked-xc2m5s?file=%2FApp.tsx&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clz0o9i3e00063p6kaw7cnl49%2522%252C%2522sizes%2522%253A%255B100%252C0%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clz0o9i3e00023p6kku146ggm%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clz0o9i3e00033p6k6s7c0kga%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clz0o9i3e00053p6k9mzczs4e%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clz0o9i3e00023p6kku146ggm%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clz0o9i3e00013p6ks7ysaech%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Findex.html%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522clz0oanaj00023p6jb0b8lc7r%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252FApp.tsx%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522id%2522%253A%2522clz0o9i3e00023p6kku146ggm%2522%252C%2522activeTabId%2522%253A%2522clz0oanaj00023p6jb0b8lc7r%2522%257D%252C%2522clz0o9i3e00053p6k9mzczs4e%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clz0o9i3e00043p6k234u3yux%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522clz0o9i3e00053p6k9mzczs4e%2522%252C%2522activeTabId%2522%253A%2522clz0o9i3e00043p6k234u3yux%2522%257D%252C%2522clz0o9i3e00033p6k6s7c0kga%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clz0o9i3e00033p6k6s7c0kga%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

### © 版本信息

- ProComponents 版本:2.7.14
- umi 版本 4.3.6
- 浏览器环境 edge 126.0.2592.113
- 开发环境 mac OS

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction in App.tsx and follow the LightFilter and ProFormFieldSet entry points named in the report. Reproduce the sequence of entering a value, clearing it, and entering a new value, then verify that the new value is accepted after the change.

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.