Closed Syltty closed 8 years ago
If your viewmodel only gets modified when you press Save you only need to wire a method to the Cancel button that sets the text back to that in its viewmodel. If it was set to update on the fly as you type then there's an option oldValues
(see source code documentation), which allows you to keep track of old values as well. Hope that answers your question.
Sorry I'm new to knockout. I have a view in read mode and an Edit button. When the user clicks it then I display an Edit view, start to watch my viewmodel for change and display a Cancel and a Save button. If the user click the Cancel button I would like to reset the watching. How could it be possible? Thank you!