Skip to content

Bug (Primitives): Add isRequired to Field Component Causes Warning In DOM #4037

Open
@ErikCH

Description

@ErikCH

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Primitive components

How is your app built?

Next.js

What browsers are you seeing the problem on?

Chrome

Please describe your bug.

When you add the isRequired prop to a Field component, I see this warning in the console.

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

I was able to reproduce this when using Studio forms

What's the expected behaviour?

Should not show warning in console

Help us reproduce the bug!

Create a new application using Studio. Create a StorageField . Set required to true. Pull into app, and look at console.

Or

import { Field } from "@aws-amplify/ui-react/internal";
<Field
        isRequired={true}
        label="test"
      >
Some field
</Field>

Code Snippet

// Put your code below this line.

Additional information and screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    PrimitiveAn issue or a feature-request for one or more UI PrimitiveStudioAn issue or feature-request for Studio UIbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions