Skip to content

onChange triggered by setState #46

@thedivac

Description

@thedivac

I have an app with many input fields which are depending on each other.
For example, when I change the value of input1 then input2 gets changed to input1 * 2 via a setState command.
This then triggers another onChange event for the input2. As I have many fields depending on each other this leads to a chain of onChange events. If I use the regular component, this doesn't happen.

My ideas on how to solve the problem:

1st idea: Make it possible to detect if the onchange is triggered by a user input. This way I can ignore the other events which are triggered by setState.

2nd idea: Only trigger onChange events after user inputs similar to the component.

Does anybody have another idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions