0

I want to reset a field value on the onchange of another field value using antd form. It is based on index.

this.form.resetFields({[`CorName_${index}`]:''}) 

I tried this, But error occurs. Is there any other way to clear particular index's field?

1 Answer 1

1

antd form resetFields only takes array of fields as parameter. Try below code:

form.resetFields([`CorName_${index}`]); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.