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(forms): getRawValue correctly work with nested form groups #12964

Closed
wants to merge 1 commit into from

Conversation

DzmitryShylovich
Copy link
Contributor

@DzmitryShylovich DzmitryShylovich commented Nov 18, 2016

Fixes #12963

@sandlunds
Copy link

sandlunds commented Nov 18, 2016

It's also getRawValue in the FormArray class (updated plunkr in #12963 shows the same problem with a FormArray and a nested FormGroup and FormArray within it)

@vicb vicb added area: forms action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 9, 2016
} else {
throw new Error(`Expected ${this} to be an instance of FormGroup.`);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these methods need more discussion, so the bug fix should be separate. Can you move into a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted

expect(a.getRawValue()).toEqual([{'c2': 'v2', 'c3': 'v3'}, ['v4', 'v5']]);
});

});
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can you move this section down below value? Kind of weird having it first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@kara kara added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Feb 10, 2017
@DzmitryShylovich
Copy link
Contributor Author

@kara ready for review

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM

@kara kara added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 10, 2017
mhevery pushed a commit to mhevery/angular that referenced this pull request Feb 10, 2017
@mhevery mhevery closed this in 1ece736 Feb 10, 2017
@DzmitryShylovich DzmitryShylovich deleted the gh/12963 branch February 10, 2017 21:23
IgorMinar pushed a commit that referenced this pull request Feb 16, 2017
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: forms cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getRawValue does not return the raw value of nested controls.
5 participants