react-mailchimp-form icon indicating copy to clipboard operation
react-mailchimp-form copied to clipboard

Input reset when update component

Open antoniotex opened this issue 5 years ago • 2 comments

[edit]This error happens when setState is called

When the component refreshes, the input loses focus and restarts, deleting what I typed

my code:

    <Mailchimp
        action={url}
        fields={[
        {
            name: 'EMAIL',
            placeholder: 'Endereço de e-mail',
            type: 'email',
            required: true
        }
        ]} 
        messages={
            {
                sending: "Enviando...",
                success: "Obrigado pela assinatura",
                error: "Ocorreu um erro",
                empty: "Por favor, digite um e-mail válido",
                duplicate: "Este e-mail já foi cadastrado",
                button: "Assine nosso newsletter"
            }
        }
        className="newsletter-sign-input"
    />

The live version is at dt3-blog.dt3.firebaseapp.com, on home, in "Assine nossa nesletter mailchimp-error-react

antoniotex avatar Jun 28 '19 13:06 antoniotex

I'm having the same issue

apolinario avatar Nov 18 '19 20:11 apolinario

same

cordial avatar Apr 23 '21 05:04 cordial