diff --git a/.changeset/sour-onions-shout.md b/.changeset/sour-onions-shout.md new file mode 100644 index 00000000000..69b58db47d6 --- /dev/null +++ b/.changeset/sour-onions-shout.md @@ -0,0 +1,6 @@ +--- +'@aws-amplify/ui-angular': patch +'@aws-amplify/ui': patch +--- + +Add defalut value attribute to the form-field diff --git a/packages/angular/projects/ui-angular/src/lib/components/authenticator/components/form-field/form-field.component.html b/packages/angular/projects/ui-angular/src/lib/components/authenticator/components/form-field/form-field.component.html index 484502acc18..725ec16c391 100644 --- a/packages/angular/projects/ui-angular/src/lib/components/authenticator/components/form-field/form-field.component.html +++ b/packages/angular/projects/ui-angular/src/lib/components/authenticator/components/form-field/form-field.component.html @@ -33,6 +33,7 @@ [name]="name" [label]="formField.label" [placeholder]="formField.placeholder" + [initialValue]="formField.value" [required]="formField.isRequired" [labelHidden]="formField.labelHidden" [autocomplete]="formField.autocomplete" diff --git a/packages/ui/src/types/authenticator/form.ts b/packages/ui/src/types/authenticator/form.ts index 65e983a63a2..608b351fce5 100644 --- a/packages/ui/src/types/authenticator/form.ts +++ b/packages/ui/src/types/authenticator/form.ts @@ -47,6 +47,8 @@ export interface FormFieldOptions { label?: string; /** Placeholder text */ placeholder?: string; + /** default value */ + value?: string; /** * @deprecated For internal use only, please use `isRequired` instead. */