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

GetRawValue() doesn't return nested disabled values #116

Closed
jingfee opened this issue Nov 15, 2021 · 3 comments
Closed

GetRawValue() doesn't return nested disabled values #116

jingfee opened this issue Nov 15, 2021 · 3 comments

Comments

@jingfee
Copy link

jingfee commented Nov 15, 2021

Is this a regression?

Yes

Description

I recently tried to update from 1.7.5 to 3.1.3 and found a bug within my application which I could trace down to getRawValue() not working as intended.

Examples when it works and doesn't work. the children-formarray is disable in these cases. For simplicitys sake the formgroups in these examples are visualized as json-objects.

This one works:

{
 "value": "foo",
 "children": [
  {
   value: "bar"
  }
 ]
}

This one doesn't work:

[
 {
  "value": "foo",
  "children": [
   {
    value: "bar"
   }
  ]
 }
]

In the second example I only get the "value: 'foo'" when calling getRawValue() and the children-formarray is completely missing. Downgrading back to 1.7.5 and it works as expected again.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

No response

Anything else?

No response

Do you want to create a pull request?

No

@NetanelBasal
Copy link
Member

Share your code, please.

@jingfee
Copy link
Author

jingfee commented Nov 16, 2021

Share your code, please.

I'm trying to replicate in a Stackblitz 🙂

@jingfee
Copy link
Author

jingfee commented Nov 16, 2021

Here is a Stackblitz showing the issue. https://stackblitz.com/edit/angular-ivy-yfgasi. It is currently configured to use 3.1.3 and as you can see, the childQuestions-array is not present when using getRawValue(). If you remove the .disable() at row 22, or change to 1.7.5 in package.json, you can see the childQuestions being printed out.

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