Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency between getFieldValue and input name #1379

Closed
chmac opened this issue Feb 12, 2016 · 0 comments
Closed

Inconsistency between getFieldValue and input name #1379

chmac opened this issue Feb 12, 2016 · 0 comments

Comments

@chmac
Copy link
Contributor

chmac commented Feb 12, 2016

I've produced a quick reproduction.

  • Open the repo, run it
  • Delete the first element in the array (click the -
  • Run these in the console:
    • AutoForm.getFieldValue('arr.1.first', 'qf')
    • jQuery('[name="arr.1.first"]').get(0).value

Note the varying output e from the first and c from the second.

However, note that if you click submit you get an empty value as the first entry in the array (see #1049).

We're using the afEachArrayItem helper, and experience the same behaviour. The value of this.index doesn't change, but the results returned by AutoForm.getFieldValue() change when an element is deleted. I also noticed that calling AutoForm.getFieldValue('arr') returns an array with the deleted elements correctly removed, unlike the issue described in #1049.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants