daffodil icon indicating copy to clipboard operation
daffodil copied to clipboard

[FEAT] Standardize Form Components with Interfaces

Open griest024 opened this issue 5 years ago • 1 comments

:bulb: Feature request

Feature Name

Standardize Form Components with Interfaces

The Desired Behavior

When authoring components that wrap form elements or other form components, there are very common properties and behavior that these components share. These components should be standarized and backed with an interface.

Developing parts of the design library that interacts with form components will need to guarantee the structure and behavior of those form components.

Your Use Case

As a developer using Angular reactive forms, I would like to have a predefined interface on which I can base my form components.

As a Daffodil developer, I would like to be able to develop augmentations and extensions to design library components that deal with forms.

Prior Work

A form component will very often have this basic structure:

class FormComponent {
  @Output() submit = new EventEmitter<FormData>()

  form: Form

  ngOnInit() {
    this.form = this.fb({...})
  }

  onSubmit() {
    this.submit.emit(this.form.value)
  }
}

Others:

griest024 avatar Jun 24 '20 17:06 griest024

#2588

AnnieMi888 avatar Dec 19 '23 15:12 AnnieMi888