Open cal-smith opened 5 years ago
It means all the existing input components have to be modified to support Reactive Forms first…
By and large they already do! Generally, if it supports ngModel
it supports usage in Reactive Forms ... most of the base inputs are just directives, and IIRC checkbox/toggle/dropdown/combobox/select all support ngModel
I'm sure there may be some additional hooks Reactive Forms want access to, but the base functionality should be there
https://www.carbondesignsystem.com/patterns/forms-pattern we have some slightly better defined form specs now, so we should be able to take another run at this pattern
Carbon Design System has pretty complete form guidance, and Angular has excellent form handling, and our form components keep improving.
So, it follows that we could provide a complete solution for generating forms, based on the Carbon principals and Angular's reactive forms module.
At a high level:
Where
FormGenerator
would wrap (or potentially extend) FormBuilder ...And the
ControlConfig
interface would resemble:There's still a few open questions, and implementation details to sort out, but this should represent the consumers view of the component/service.