enter code hereHow can we dynamically edit an element in form list and set that element using setFieldsValue
A solution I got is call setFieldsValue for entire form List but that is not fair, cause performance issue
I have a form structure like this
users: [
{
name: "bob",
education: [
{
qualification: "masters",
college: "abc",
},
{
qualification: "degree",
collge: "ijk",
},
],
},
{
name: "alice",
education: [
{
qualification: "ug",
college: "abc",
},
{
qualification: "higher secondary",
college: "def",
},
],
},
];
implemented using form list
- I want to update 'qualification' of 'education[1]' of user 'alice' using antd v4 setFieldsValue
- I got a solution that is, take all values using getFieldsValue and change change 'qualification' and then update entire form value, but it causes some performance issue large applications
- How to use setFieldsValue to update a single field in form?
In antd v3 it is archived by providing path in setFeildsValue like
setFieldsValue({ 'user.1.education.1.qualification':'something' })
Thanks in advance for your valuable answers