I am facing a challenge with multiple forms that were created from an API. I need to constantly monitor if the input values within each form have been changed in order to toggle the button between disabled and enabled states.
To address this issue, I attempted to create a single flag: isChanged: false
. This allowed me to control the button like this:
<v-btn
:disabled="!isChanged"
>
Save
</v-btn>
However, dealing with multiple forms means I might need to generate multiple flags dynamically for each form. Unfortunately, I am unsure of how to achieve this efficiently.
In addition, there is a Save All
button which could require a new flag like isChangedAny: false
to determine whether any of the forms have been altered or not.
If any input value within a form changes, the 'Save All' button should transition from a disabled state to an enabled one. Yet, my main struggle lies in developing a method to accurately detect these changes in the form inputs. Can someone guide me on this?