There is a gap in the handling of the OnHandleSubmit argument in the Form component documentation
complete
Tomoaki Sano (ryan5500)
The arguments for the onHandleSubmit function described in this document differ from the actual behavior.
const handleSubmit = (values) => {
executeAction ({
id: values.id,
email: values.email,
registered_at_from: values.registered_at_from,
registered_at_to: values.registered_at_to,
});
};
In the documentation, values are accessed with
values.id
, but in reality, values can be accessed with values.values.id
.Shuichiro Fukuoka (BaseMachina)
marked this post as
complete
Tomoaki Sano (ryan5500)
const handleSubmit = ({values}) => {
does it look good to write it like this?
ベースマキナサポート担当
Tomoaki Sano (ryan5500)
Thank you for your very careful report.
I am certainly aware that there is a difference in the handling of arguments when submitting the form as you mentioned.
We apologize for the inconvenience caused by the incorrect expression.
As you said, I think it's easy to extract the contents values at the stage where arguments are accepted in the callback.
The documentation will be developed internally later in the direction of changing it according to that code example.
ベースマキナサポート担当
Tomoaki Sano (ryan5500)
I just corrected the documentation.
We apologize again for any inconvenience this may have caused due to incorrect expressions.
We would appreciate it if you could continue to report any issues you notice in the future.