-
Notifications
You must be signed in to change notification settings - Fork 347
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
Wrong initial collection index #858
Comments
Same problem here. |
could you create a pr for this please |
@wolfwolker |
ping @phiamo @ro0NL @wolfwolker @ro0NL could you please test your code with the sample in #977 ? |
@aferrandini @ro0NL @wolfwolker is there still anything to do here? |
Seems fixed in beta4 |
So i close this |
Hi,
Im using the bootstrap collection JS asset for a symfony collection form field (which is mapped with a doctrine collection).
The collection is embedded with zero initial elements. When adding an element (the first) it gets index
1
. The initial index in the doctrine collection is0
, this way validation errors etc. are not displayed at the correct field but at the 2nd collection field (as that one has index1
) or on top of the form without a 2nd collection field.When I debug the JS forcing to start index
0
everything works as expected. I changed:this.options.index[this.options.collection_id] = this.options.initial_size;
to
this.options.index[this.options.collection_id] = this.options.initial_size - 1;
Can you have a look at this?
The text was updated successfully, but these errors were encountered: