Skip to content

Loss of state on React re-render #10584

@eralmansouri

Description

@eralmansouri

Describe the bug
The issue here is that whenever the form or components re-renders, SurveyJS throws my cursor unexpectedly, deletes text even as I'm typing, and the whole input form constantly flashing.

Steps to reproduce

  1. Create a parent react component that has state.
  2. Add SurveyJS somewhere inside it.
  3. Simulate state changes while you fill out the form.
  4. The form starts flashing, your cursor placement keeps getting reset, your data is deleted partially or totally depending on input type.

Proof of Concept
Forked an example from the docs and simply added setInterval that updates state. You can find it here

Metadata

Metadata

Assignees

Labels

buguser issueAn issue or bug reported by users

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions