M
M
mxwuser2021-02-24 22:43:51
React
mxwuser, 2021-02-24 22:43:51

How to fire the change event from the console on a React form?

There is a site with a react form on it - a search field and a find button. The find button is not active until you enter text in the field.
It is necessary to substitute the value from the console so that the button becomes active.
I tried and usually change to Js through value, and using jquery, and using a variant through the dispatch event.
In all options, the field is filled, but the button is not active until you start typing from the keyboard with your hands. Is it possible somehow from the console after changing the value to tell the script that the field is filled / filled?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DrWeyber, 2021-02-25
@DrWeyber

If the form is reactive, then through the console you will not be able to submit it, since the functions are encapsulated (closure), and there is no access to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question