Closed
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:
Note: The example from the docs is behaving like this as well even when the code is copied and pasted.
Activity