I am trying to add a prompt for Unsaved changes in my Form, So I want to check If the input is dirty or not,
I think it would be a good idea to get the touched object on onChange for forms, Like we have it right now on onSubmit:
onSubmit={({ value, touched }) => {}};
vs
onChange={({ value}) => {}};
:(
Hey @ShimiSun, correct me if I'm wrong but this will not be a breaking change? Right now onChange is receiving as parameter the form value but if we add another property like touched it will receiving an object and you will have to access the object to get the form value so this can break some implementations.
I think this will be an awesome feature and I want to implement it, my worries are with the backwards compatible.
@netochaves good observation. I don't think this will be a breaking a change, we'll know better once we'll have a concrete PR
too look at, would you like to take a stab at it and see if you are running into potential changes and submit a draft with your observations? It will help us keep the conversation running.
Thank you @netochaves for adding this enhancement! It will be available on our next official release.
Most helpful comment
Thank you @netochaves for adding this enhancement! It will be available on our next official release.