Skip to content

Custom sign up fields not appearing #718

Closed
@melmarshall

Description

Using @aws-amplify/ui-react version ^0.0.0-next-202110420146

I added a custom component to withAuthenticator() but only the default fields are rendering. Last week it was rendering as expected but then stopped. My code below:

export default withAuthenticator(App, {
  components: {
    SignUp: {
      FormFields() {
        const { validationErrors } = useAuthenticator();
        return (
          <>
            <Authenticator.SignUp.FormFields />

            <TextField
              label="Invite Code"
              labelHidden={true}
              name="invite_code"
              placeholder="Invite Code"
              hasError={!!validationErrors.validInvite}
              errorMessage={validationErrors.validInvite}
            />
          </>
        );
      },
    },
  },
  services: {
    async validateCustomSignUp(formData) {
      // TODO
      return {};
    },
  },
});

Expected: An extra text field should appear in the sign up form but this is what is rendered:
Screen Shot 2021-11-15 at 9 39 37 PM

Note: The example from the docs is behaving like this as well even when the code is copied and pasted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

AuthenticatorAn issue or a feature-request for an Authenticator UI ComponentbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions