You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see in this demo, every time I change a field's value, the field loses focus. I suspect the cause of the problem is react-jsonschema-form-conditionals, because if I replace <FormWithConditionals> with <Form>, the problem does not occur.
If I remove the handler onChange={this.handleFormDataChange} the input field no longer loses focus when it's value changes (but removing this handler breaks the FormModelInspector).
Apologies for not providing a JSFiddle example instead of pasting all the code into the issue, but I couldn't figure out how to add react-jsonschema-form-conditionals as a dependency, and import applyRules in JSFiddle
The text was updated successfully, but these errors were encountered:
donalmurtagh
changed the title
Form field loses focus when data changes
Form fields lose focus when input value changes
Feb 1, 2018
I'm trying to render a
FormWithConditionals
and aFormModelInspector
. The latter is a very simple component that shows the currentformData
.The source code is given below:
As you can see in this demo, every time I change a field's value, the field loses focus. I suspect the cause of the problem is
react-jsonschema-form-conditionals
, because if I replace<FormWithConditionals>
with<Form>
, the problem does not occur.If I remove the handler
onChange={this.handleFormDataChange}
the input field no longer loses focus when it's value changes (but removing this handler breaks theFormModelInspector
).Apologies for not providing a JSFiddle example instead of pasting all the code into the issue, but I couldn't figure out how to add
react-jsonschema-form-conditionals
as a dependency, and importapplyRules
in JSFiddleThe text was updated successfully, but these errors were encountered: