ant-design / ant-design/pro-components

🐛[BUG] StepsForm 设置 onCurrentChange 后,step 还是无法点击

Open
#7,851 2 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

### 🐛 bug 描述
使用 StepsForm,设置了 onCurrentChange,但点击 step,onCurrentChange 并没有执行,导致无法 setCurrent

### 📷 复现步骤
- 使用 StepsForm
- 设置 onCurrentChange
- 点击 step

### 🏞 期望结果

onCurrentChange 会被调用

### 💻 复现代码

设置 onCurrentChange 就能复现

### © 版本信息

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

### 🚑 其他信息

![image](https://github.com/ant-design/pro-components/assets/13073614/2dcb58e9-3a88-46fc-b696-e3aec45ee994)

问题就出在这里,点击 step 会调用 onChange,但 onChange 没有调用 onCurrentChange。

Contributor guide

Open the contributing guide

Research direction

Start at the StepsForm entry point and trace how clicking a step invokes onChange versus onCurrentChange. Reproduce the issue with StepsForm configured with onCurrentChange; done means clicking a step invokes onCurrentChange so the current step can be updated.

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.