ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.04k stars 1.29k forks source link

steps-form proFormInstance.setFieldsValue setting only first step #8339

Open Ladvace opened 3 weeks ago

Ladvace commented 3 weeks ago

Reproduction link

Edit on CodeSandbox

Steps to reproduce

N/A

What is expected?

as you can see I set "name" in the firststep and "surname" in the second, but only name get set

What is actually happening?

surname not being set

Environment Info
antd 5.16.2
React react 18.2.0 ,extjs (14.1.3)
System Macos sonoma
Browser chrome
dragonwang-hub commented 3 weeks ago

Hi Ladvace, Thanks for your example, that helps me resolve how to dynamically set init value in steps form.

And I found the RC of you code, please set the entire object params in

<StepsForm<{
        name: string;
// add key value
// surname: string;
// ...
      }>
 You will got the all init value in you form.
Ladvace commented 3 weeks ago

I tried but it doesn't seem working

example

Ladvace commented 1 week ago

any updates?