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

After a failed relationship field validation the "Add" button is disabled #961

Closed
4 tasks done
SebaOfek opened this issue Jun 1, 2023 · 4 comments · Fixed by aws-amplify/amplify-codegen-ui#1076
Closed
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

@SebaOfek
Copy link

SebaOfek commented Jun 1, 2023

Before opening, please confirm:

App Id

d1svm68u3nyy54

Region

us-west-2

Environment name

staging

Figma File Version (if applicable)

No response

Amplify CLI Version

12.0.3

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

16.20.0

What operating system are you using?

Amazon Linux (Cloud9)

Browser type?

Chrome

Describe the bug

When submitting a form if a relationship field validation fails, mostly because the user did not click the "Add" button, the "Add" button of the relationship field is disabled:

image

forcing the users to:

  1. remove the previously selected value
  2. select the value again
  3. click de "Add" button
  4. and submit the form again

Expected behavior

The add button should be enabled, or better, if the a value was indeed selected in the relationship field but the user just forgot to click the add button, just add the selected value and succeed validation.

Reproduction steps

  1. build a form with at least 1 relationship field
  2. set the field as required
  3. run the app and go to de form
  4. select a value in the relationship field but DO NOT click the "Add" button
  5. submit the form
  6. go back to the relationship field
  7. notice the "Add" button is disabled

Project Identifier

No response

Additional information

No response

@ykethan
Copy link
Member

ykethan commented Jun 2, 2023

Hey @DataLoreB4, 👋 thank you for reaching out. I was to reproduce the issue. Marking as bug.
My reproduction steps.

  1. Create 2 models with relationship as many to many
  2. in the UI builder, select new to build a new form
  3. select the relationship table created(the name of the table would be the combination of the two models)
    try adding the field without clicking on add button
Screen.Recording.2023-06-02.at.12.04.09.PM.mov

Note: clicking on the x button and reselecting the value and then clicking add works as expected

@ykethan ykethan added 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 and removed pending-triage An issue that is pending triage labels Jun 2, 2023
@SebaOfek
Copy link
Author

SebaOfek commented Jun 5, 2023

Hey @DataLoreB4, 👋 thank you for reaching out. I was to reproduce the issue. Marking as bug. My reproduction steps.

  1. Create 2 models with relationship as many to many
  2. in the UI builder, select new to build a new form
  3. select the relationship table created(the name of the table would be the combination of the two models)
    try adding the field without clicking on add button

Screen.Recording.2023-06-02.at.12.04.09.PM.mov
Note: clicking on the x button and reselecting the value and then clicking add works as expected

Hi ykethan, yes, you got It!

But it is not "mandatory" to have two relationship fields to reproduce the issue, I have just one (among other standard fields) and the issue is present too. You can replace one of the relationship field with a simple string textbox and try again. You should see the same behavior.

Thanks a lot, kind regards,
Sebastian.

@ykethan
Copy link
Member

ykethan commented Jun 5, 2023

Hey @DataLoreB4, thank you for the information. The Amplify Studio team is aware on the behaviour and will be working on fixing this behaviour.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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

Successfully merging a pull request may close this issue.

2 participants