amplify-studio icon indicating copy to clipboard operation
amplify-studio copied to clipboard

Storage Manager Form is Required is not working as expected

Open ErikCH opened this issue 1 year ago • 2 comments

Before opening, please confirm:

  • [X] I have searched for duplicate or closed issues.
  • [X] I have read the guide for submitting bug reports.
  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • [X] I have removed any sensitive information from my code snippets and submission.

App Id

arn:aws:amplify:us-east-1:978507172420:apps/d1cly8e6g4zmba

Region

us-east-1

Environment name

storage-ex

Figma File Version (if applicable)

No response

Amplify CLI Version

12.1.1

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

v16.15.0

What operating system are you using?

Mac

Browser type?

Chrome

Describe the bug

When configuring Storage Manager using the UI Library and clicking on the StorageField the Field is required option doesn't seem to do anything. You can still upload or not upload files. image

After toggling Field is required and pulling it back into my application it starts showing a console warning.

 React does not recognize the `isRequired` prop on a DOM element.

I have created a bug on this with the UI team, but they said it also needs to be opened here.

Expected behavior

Should require the user to upload a file, or the field should not be present. Also shouldn't give an error in the console

Reproduction steps

  1. Create an app in studio
  2. Create a data model
  3. Go into UI Library and add a StorageField
  4. Change Field is required to being on
  5. Amplify pull
  6. Run application see warning in console.

Project Identifier

No response

Additional information

No response

ErikCH avatar Jun 21 '23 18:06 ErikCH

Hey @ErikCH, 👋 thank you for reaching out. when clicking on submit the form should show you the following

image image

do you observe the same behaviour on Amplify Studio and observe a different behaviour in your client application?

ykethan avatar Jun 21 '23 18:06 ykethan

Hi @ykethan , correct it did not show that message. It allowed me to submit, in the client application.

ErikCH avatar Jun 26 '23 19:06 ErikCH