T
TanStack11mo ago
flat-fuchsia

Reset Specific Field

I am working on a recipe book and have a form with recipe details including an array field to represent ingredients. When selecting an ingredient a modal is presented with that ingredients' details. If I edit some of these subfields, then close the modal without clicking the confirm button, I want to reset the ingredient details, but not the entire form. As far as I know, form.reset() will reset the whole form. Is there a way to target a specific field to reset (ex. form.reset('ingredients[${i}]')?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?