We are using onKeyDown to detect if default values in form are changed or same as when form loaded.
Exp: If form is opened for the edit purpose we disabled form and when user enter any input check original data in state and data in input is same or updated. It its different we enabled "Update" button. If values are same "Update button is disabled"
I am able to do this and check if form is updated or not and based on it able to enabled/disable "Update" button.
Is is onKeyDown event does not get triggered on select option change. Also there is no other event in form for this.
Note: I do not want to attach onchange to each input field in long form.
We are using onKeyDown to detect if default values in form are changed or same as when form loaded.
Exp: If form is opened for the edit purpose we disabled form and when user enter any input check original data in state and data in input is same or updated. It its different we enabled "Update" button. If values are same "Update button is disabled"
I am able to do this and check if form is updated or not and based on it able to enabled/disable "Update" button.
Is is onKeyDown event does not get triggered on select option change. Also there is no other event in form for this.
Note: I do not want to attach onchange to each input field in long form.