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

Hide expression on repeat component breaks defaultValues of nested fields #3891

Open
gaetanlgce opened this issue Apr 4, 2024 · 2 comments
Labels

Comments

@gaetanlgce
Copy link

Description
When using expressions.hide on a custom repeating section to conditionnally display it, defaultValue is ignored in fields in the fieldGroup. If the expressions.hide is not present, default values are applied as expected when adding items.

Minimal Reproduction
https://stackblitz.com/edit/angular-e9plpt?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Frepeat-section.type.ts,src%2Fstyles.scss,src%2Fapp%2Fapp.component.html

In this example, the defaultValue: 'Buy eggs', is not applied as expected because there is the hide expression line 46.

Your Environment

  • Angular version: 14.3.0
  • Formly version: 6.3.0

Additional context
It's maybe related to that issue #2651

@gaetanlgce gaetanlgce added the bug label Apr 4, 2024
@uagrawal-evertz
Copy link

uagrawal-evertz commented Apr 19, 2024

I am also facing similar kind of issue.
@aitboudad is there any resolution to fix this ?

@aitboudad
Copy link
Member

@aitboudad is there any resolution to fix this ?

Hi, I'll this week if time allows 🙏 .

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

No branches or pull requests

3 participants