R
Refine
B
Refine
•
3y ago
broad-salmon
and step form
how to access form
.item values which are in stepform in antd formprops
.onFinish
Refine
Join
6,201
Members
View on Discord
Was this page helpful?
Yes
No
B
broad-salmon
OP
•
1/6/23, 12:16 PM
its working properly using form
, but not able to get using steps form
B
broad-salmon
OP
•
1/6/23, 12:17 PM
<Form
form
=
{form
}
{
.
.
.formProps
}
onFinish
=
{
(values
: any
)
=
>
{
formProps
?
.onFinish
&
&
formProps
?
.onFinish
(
{
.
.
.values
,
tax
_percent
: value
,
}
)
;
}
}
>
B
broad-salmon
OP
•
1/6/23, 12:17 PM
this way is not working in steps
E
efficient-indigo
•
1/6/23, 12:17 PM
Hey
@rehan1
, checking the issue now
E
efficient-indigo
•
1/6/23, 1:22 PM
@rehan1
, can you provide a repro in stackblitz or somewhere else
? What
's the exact issue here
, is
values
values
undefined or lacking some properties
?
B
broad-salmon
OP
•
1/6/23, 3:47 PM
the stckblitz link in the documentation of antd steps is also not getting open so that i can let u know the issue
B
broad-salmon
OP
•
1/6/23, 3:48 PM
https://stackblitz.com/edit/refinedev-refine-ezwfvx?preset=node
B
broad-salmon
OP
•
1/6/23, 3:48 PM
this is the link in documentation
B
broad-salmon
OP
•
1/7/23, 4:03 AM
@alicanerdurmaz i need to modify form
.item values before sending
<Steps
{
.
.
.stepsProps
}
>
<Steps
.Step title
=
"First Step
"
/
>
<Steps
.Step title
=
"Second Step
"
/
>
<
/Steps
>
<Form
{
.
.
.step
}
layout
=
"vertical
"
onFinish
=
{values
=
>
{
console
.log
(values
,
"safsjdfvsjdhvkjdshvkj
"
)
;
}
}
>
{formList
[current
]
}
<
/Form
>
B
broad-salmon
OP
•
1/7/23, 4:04 AM
in Normal form its working in steps am not a
O
Omer
•
1/7/23, 4:28 AM
Hey
@rehan1
,
You can check this issue
https://github.com/refinedev/refine/issues/1594
GitHub
[BUG] onFinish doesn't work when used in a stepsForm · Issue #1594 ...
Describe the bug When I have a steps Form and I need to use onFinish to modify the payload before sending the API
, this doesn
&
#39
;t happen
. The form does not modify the payload
. To Reproduce St
.
.
.
B
broad-salmon
OP
•
1/7/23, 4:38 AM
it worked
V
verbal-lime
Hey @rehan1 , You can check this issue https://github.com/refinedev/refine/issue...
B
broad-salmon
OP
•
1/7/23, 4:54 AM
can i modify the values like for example am able to add new but nnot able to remove from it
.
. before sending i want to remove a value from it
O
Omer
•
1/7/23, 4:58 AM
You can do whatever you want with the method I suggested in the issue
.
B
broad-salmon
OP
•
1/7/23, 5:01 AM
<Button
{
.
.
.saveButtonProps
}
onClick
=
{
(
)
=
>
{
const values
= form1
.getFieldsValue
(true
)
;
console
.log
(values
,
"
,mnasskfjnskdzv
"
)
;
submit
(
{
title
:
"test
,test
,test
"
,
}
)
;
}
}
>
Submit
<
/Button
>
B
broad-salmon
OP
•
1/7/23, 5:01 AM
HERE I AM not SENDING VALUES but in payload values are being sent
B
broad-salmon
OP
•
1/7/23, 5:01 AM
object
:
{name
:
"TEST
"
, base
_rate
:
"5
"
, department
_id
:
"b9934b58
-b851
-45bd
-b234
-6641be636d56
"
,
…
}
base
_rate
:
"5
"
department
_id
:
"b9934b58
-b851
-45bd
-b234
-6641be636d56
"
name
:
"TEST
"
title
:
"test
,test
,test
"
O
Omer
•
1/7/23, 5:04 AM
Might be related to Ant Design