Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When using `NgxSubFormRemapComponent` I'd expect `transformToFormGroup` to run when component is created

See original GitHub issue

I’d like to be able to handle default values.

I’d expect transformToFormGroup to be run when the component is created but if the value it receives is null, nothing happens and we cannot set default values.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

maxime1992commented, Mar 19, 2019

Yes you’re probably right.

I think it’s not the library responsibility.

@zakhenry anything to add or shall we close it?

lppeddcommented, Mar 19, 2019

@maxime1992 Shouldn’t default values be handled using

public formControls: Controls<Dog> = {
   isNice: new FormControl(true)

for example?

Read more comments on GitHub >

github_iconTop Results From Across the Web

formGroup expects a FormGroup instance. Please pass one in ...
In my case, I was using Reactive Forms and loading the data for form asynchronously from a service. But, the form template will...
Read more >
Testing Dynamic Forms in Angular - Telerik
Let's update the component to generate form controls for each input field and to group the elements using the FormGroup class. Open the...
Read more >
Reactive forms - Angular
This module declares the reactive-form directives that you need to use reactive forms. Generate a new FormControl instance and save it in the...
Read more >
How to Use Angular FormArray(s) within FormGroup(s) In ...
Start by setting up a new project: ng new [name your project]. Then create the component: ng g component [component name].
Read more >
Angular Forms: Useful Tips - InDepth.Dev
Abstract away harder form controls to custom components implementing ControlValueAccessor . Let's go over these cases. Case 1: Limit your use of FormGroup.get ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found