aws-amplify / aws-amplify/amplify-studio

Storage Manager Form is Required is not working as expected

Open
#981 2 comments 0 reactions 0 assignees View on GitHub
bug studio-ui ui-forms
Dominant language
No language data
Stars
135
Forks
32
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-adminui/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-adminui/blob/main/CONTRIBUTING.md#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](https://github.com/aws-amplify/amplify-ui/issues/4037), 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_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue through the UI Library Storage Manager with a StorageField, enable Field is required, pull the application, and observe upload behavior and the React console warning. The fix is complete when the required setting enforces file upload or removes the field and no longer produces the isRequired warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.