-
Notifications
You must be signed in to change notification settings - Fork 323
Add new attribute initialvalue to the form-field #6007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add new attribute initialvalue to the form-field #6007
Conversation
🦋 Changeset detectedLatest commit: 9230d49 The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
can someone take a look at this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gongte1937, sorry for the delayed response. If you're still interested in implementing this feature, I've left some feedback. Thanks!
@@ -33,6 +33,7 @@ | |||
[name]="name" | |||
[label]="formField.label" | |||
[placeholder]="formField.placeholder" | |||
[initialValue]="formField.value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that when running the Angular example app, the text field now adds "undefined" to the input.
@@ -47,6 +47,8 @@ export interface FormFieldOptions { | |||
label?: string; | |||
/** Placeholder text */ | |||
placeholder?: string; | |||
/** default value */ | |||
value?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is generally preferred to extend these FormFieldOptions
; an example of this can be found here in our React package for Authenticator.
Description of changes
Update the
form-field.component
andFormFieldOptions
so the form could accept default value input.Issue #, if available
It is regarding to this issue
Description of how you validated changes
I have used
yarn build
andyarn pack
to pack the package and install it from my project, and tested the functionality. And it works fine.Checklist
yarn test
passes and tests are updated/addeddocs
,e2e
,examples
, or other private packages.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.