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

Fix initialValue is ignored in children of ArrayInput #4810

Merged
merged 2 commits into from
May 15, 2020

Conversation

fzaninotto
Copy link
Member

Closes #4709

@fzaninotto fzaninotto added the RFR Ready For Review label May 13, 2020
@fzaninotto fzaninotto merged commit 10a3e11 into master May 15, 2020
@fzaninotto fzaninotto deleted the fix-default-value-in-ArrayInput branch May 15, 2020 10:46
@fzaninotto fzaninotto added this to the 3.5.2 milestone May 15, 2020
if (Array.isArray(record[key])) {
// array of values
record[key].forEach((value, index) => {
if (value && Object.keys(value).length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks up arrays with non "Dictionary" objects, like string for example

Object.keys("cats")
[ '0', '1', '2', '3' ]

@NikitaVlaznev
Copy link
Contributor

Causes a bug #4823.

@alanpoulain
Copy link
Contributor

@NikitaVlaznev see #4819

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

Successfully merging this pull request may close these issues.

initialValue is not used on child fields of SimpleFormIterator
3 participants