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

overrides for Autocomplete component in amplify studio-generated form not working #1024

Open
4 tasks done
floriankrueper opened this issue Sep 4, 2023 · 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

@floriankrueper
Copy link

floriankrueper commented Sep 4, 2023

Before opening, please confirm:

App Id

d20x6uoo2bidyv

Region

eu-central-1

Environment name

develop

Figma File Version (if applicable)

No response

Amplify CLI Version

12.4.0

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

No response

What operating system are you using?

No response

Browser type?

No response

Describe the bug

I created a form with amplify studio.
In that form i use a relation to another model, which is why an Autocomplete component is included in the form.
However, the Autocomplete component gets wrapped in an ArrayField by Amplify Studio.
While the Autocomplete component has set hideLabel=true, the outer ArrayField is responsible for rendering the label for the construct.
The problem now is, that we cannot override the label for the ArrayField. ArrayField simply misses the line:
{...getOverrideProps(overrides, "FIELDNAME")}

Expected behavior

Something like
{...getOverrideProps(overrides, "FIELDNAME_container")}
should be included in the outer ArrayField, so we can properly access the label of an Autocomplete Component.

Reproduction steps

  1. Create a graphql schema with two Models with a relation
  2. Create a form using Amplify Studio
  3. Import that form into your REACT project
  4. Try to override the label for the resulting Autocomplete field

Project Identifier

No response

Additional information

As a workaround, i simply put
{...getOverrideProps(overrides, "FIELDNAME_container")}
in the auto-generated form and am now able to access the label and translate it.

@floriankrueper floriankrueper added the pending-triage An issue that is pending triage label Sep 4, 2023
@petercwk-aws petercwk-aws added the studio-ui An issue that needs to be tracked by Studio Console team label Sep 5, 2023
@ykethan
Copy link
Member

ykethan commented Sep 8, 2023

Hey @floriankrueper, thank you for reaching out. On discussing with the team, I was able to confirm the behaviour. Glad to hear that you have a workaround for this.
marking this as bug.

@ykethan ykethan added bug An issue which has been identified as a bug ui-forms issues related to UI builder forms and removed pending-triage An issue that is pending triage labels Sep 8, 2023
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

3 participants