Faced the same issue, it has something to do with setState re-rendering the whole component so the Modal being inside the component gets re-rendered. I moved the whole Modal into a separate file and had all its states in its own component file to fix the issue.