Undo functionality in Dojo
-
03-07-2021 - |
Frage
I'm using an enhanced grid in Dojo and I would like to implement "Undo" functionality . For example after editing a cell, adding/deleting a row the user should be able to revert that action.
Any pointers how to get started?
Thanks!
Lösung
Well maybe you could get inspiration from this Comand History pattern : https://gist.github.com/c210c0344ca4d4bdfacb
About the actions on DataGrid I assume you know what to do and you were just asking about some "undo mechanism" :)
I hope this will help. I've been using it for a while and it works well
Andere Tipps
Fetch and save the grid store in some variable before editing . Upon clicking the undo button/link set the grid store with the saved old store.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow