Single field sub form interface
See original GitHub issueIntent: Allow for easy implementation of single value (no form group) custom components that implement value accessor interface. This would allow to create smart components like selects / autocompletes that load data themselves that can easily be reused across the application Think customer / user / country pickers or any commonly used domain specific pickers you can think of.
Issue today:
NgxSubFormComponent
requires a complex type as generic parameter for class fields / methods to make senseformControlNames
etc.- Its possible to use
NgxSubFormRemapComponent
to wrap the single value into a form group and back but it generates boilerplate that is redundant and feels unnecessary especially for new devs joining a project
Feature request:
Create an additional interface that exposes the same functionality as NgxSubFormComponent
or NgxSubFormRemapComponent
but all methods / fields should be singular formControlName
/ formControlValue
etc.
UPDATE: https://stackblitz.com/edit/issue-demo-ngx-sub-form-single-value
Notes:
- checkout the
GenericLookupComponent
- here you can see how the single value is wrapped / unwrapped
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Introduction to Subforms | Granicus Support
Subforms can pull in values from the main form. This only works in the subform fields all have unique data names compared to...
Read more >Building a Subform - CRM - Zoho Cares
A subform is a secondary form or a table, which will enable you to include multiple line items into a primary form. Learn...
Read more >Create a form that contains a subform (a one-to-many form)
Learn how to create a form in Access that contains a subform (also known as a one-to-many form, a parent/child form, or a...
Read more >Defining the types of application forms - Infor Documentation
A single-record form will have at least one key field. ... A subform is an application form that you can access only by...
Read more >The Best Way to build reactive sub-forms with Angular
Forms represent one of the most important parts of almost all frontend applications. From a single input field to a multi step wizards,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will do
To better understand the use cases for single value sub forms and as mentioned in #139 we have also created an additional sub form type for arrays with array related helper functionality, sample can be found here