Skip to content

Form's onValidate() not returning updated elements when using dynamic add remove functionality #4743

@shreyashah7

Description

@shreyashah7

We have created a Dynamic Add Remove Component inside a form. Whenever i delete any input field it gets deleted from the UI but in form's onValidate Function, I still see removed input's validation.

Expected Behavior

onValidate() Function returning {errors, infos} should only return existing elements on Form

Actual Behavior

But it is still persisting removed elements from form.

URL, screen shot, or Codepen exhibiting the issue

Screen Shot 2020-11-12 at 10 39 36 AM

Screen Shot 2020-11-12 at 11 14 29 AM

ezgif com-gif-maker

Steps to Reproduce

  1. create a dynamic add remove component, add elements and then remove elements using splice.
  2. Check the form's onValidate() results.

CC: @ShimiSun

Metadata

Metadata

Labels

bugissue that does not match design or documentation and requires code changes to address

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions