Skip to content
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

Clear on Submit Doesn't Clear when Type Changed from TextField to TextAreaField #1089

Open
4 tasks done
mitchelllee222 opened this issue Jan 9, 2024 · 1 comment
Open
4 tasks done
Labels
bug An issue which has been identified as a bug studio-ui An issue that needs to be tracked by Studio Console team ui-forms issues related to UI builder forms

Comments

@mitchelllee222
Copy link

Before opening, please confirm:

App Id

arn:aws:amplify:us-east-1:188426401085:apps/d1kcgq6spbdji7

Region

us-east-1

Environment name

staging

Figma File Version (if applicable)

No response

Amplify CLI Version

No response

If applicable, what version of Node.js are you using?

No response

What operating system are you using?

Windows 11

Browser type?

Google Chrome

Describe the bug

I've created a simple ContactUs in my data models in Studio with FirstName, LastName, EmailAddress, and Message. This created a ContactUsCreateFrom component in my UI Library. I clicked Configure, selected the Message field and changed the Type to TextAreaField. The imported this into my local project. Now, when you open the component in the browser, you can type in all your values and select the Submit button. Submit is submitting the value into DynamoDB, however, all the fields except the Message field are clearing the values.

If I just use the default Type of TextField, the field clears out appropriately after selecting Submit.

Expected behavior

When the underlying data model property type is String and you change the Type of the field within UI Library for the created component to TextAreaField instead of TextField, on pressing Submit, the field would clear it's value after submitting.

Reproduction steps

  1. Create data model with a String type property.
  2. Open created component for model in UI Library in Amplify Studio.
  3. Click Configure on selected component.
  4. Click on field that represents String property from data model.
  5. Change Type dropdown to TextAreaField from TextField.
  6. Import into local project.
  7. Run project with component showing on page and enter data in field.
  8. Press Submit button on component.

Project Identifier

No response

Additional information

No response

@mitchelllee222 mitchelllee222 added the pending-triage An issue that is pending triage label Jan 9, 2024
@ykethan
Copy link
Member

ykethan commented Feb 1, 2024

I was able to reproduce the issue, Marking as bug.

@ykethan ykethan added bug An issue which has been identified as a bug ui-forms issues related to UI builder forms studio-ui An issue that needs to be tracked by Studio Console team and removed pending-triage An issue that is pending triage labels Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue which has been identified as a bug studio-ui An issue that needs to be tracked by Studio Console team ui-forms issues related to UI builder forms
Projects
None yet
Development

No branches or pull requests

2 participants