pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

steps-form proFormInstance.setFieldsValue setting only first step

Open Ladvace opened this issue 1 year ago • 3 comments

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

Ladvace avatar Apr 21 '24 10:04 Ladvace

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.

dragonwang-hub avatar Apr 23 '24 01:04 dragonwang-hub

I tried but it doesn't seem working

example

Ladvace avatar Apr 23 '24 06:04 Ladvace

any updates?

Ladvace avatar May 02 '24 12:05 Ladvace