2 years ago

#75650

test-img

BrainRTP

Antd. Form.List and Form.Item get data from initialValue

Can you please tell me how can I pass data from initialValue (line #187) to (line #217)? I need to do a check, and for this, I need to get the index of the current object I'm accessing and the main data set (that is, initialValue).
enter image description here

I used this example - https://ant.design/components/form/#components-form-demo-dynamic-form-items-complex

The problem is that I don't know how to get the original dataset from the .

The idea is this: The user can change the name/description of the fields only for the newly created objects that they added through the button (as in the example), but for those fields that were immediately created from the data set - they cannot, that is, they have should be on.

Tell me, please, how can I do this? I haven't been able to solve the problem for over an hour now.

I need to somehow assign a custom ID (from a dataset) for each form. And then pass the information of this field to the validator. If it has id != null => the field becomes disabled. But damn, how to do it.... 🙁

antd

0 Answers

Your Answer

Accepted video resources