Custom Input field loses focus when I type #3777
-
I have this signup form with custom Input field. Now when I try typing, after the first character it loses focus. Funny thing is im pretty sure this used to work fine but all of a sudden doesnt. I saw this already: #882 But I tried various things from that and couldnt fix it. Any ideas?
Then the custom Input field looks like this:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Here is an even simpler example and same issue:
Also if I remove that function in Formik: |
Beta Was this translation helpful? Give feedback.
-
Fixed, my fault. The Stack component was internally setting keys like this: |
Beta Was this translation helpful? Give feedback.
Fixed, my fault. The Stack component was internally setting keys like this:
<div key={shortid.generate()}>{item}</div>
which causes the re-render