Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify documentation on Undo/Redo #8463

Open
wojciechczerniak opened this issue Nov 5, 2018 · 2 comments
Open

Clarify documentation on Undo/Redo #8463

wojciechczerniak opened this issue Nov 5, 2018 · 2 comments
Labels
Docs: Content Issues related to Handsontable's documentation content Effort: Medium Impact: Medium Reported Undo-redo Plugin

Comments

@wojciechczerniak
Copy link
Contributor

@dmt0 commented on Fri Oct 19 2018

Description

From https://handsontable.com/docs/6.1.0/UndoRedo.html :

Note, that not all actions are currently undo-able. The UndoRedo plugin is enabled by default.

The question is, what is and what is not undoable as of now?


@AMBudnik commented on Mon Oct 22 2018

You're right, we need to check what's going on in the code or try it out to know.

Changes that can be undone

  • editing
  • insert row/column
  • remove row/column
  • filtering

@dmt0 commented on Wed Oct 31 2018

Just looked at the code. Add to the list:

  • cell alignment
  • row move
  • cells merge/unmerge

https://github.com/handsontable/handsontable/blob/master/src/plugins/undoRedo/undoRedo.js

@AMBudnik
Copy link
Contributor

There's also a problem with the fact that the undoRedo is not accessible via getPlugin. Like the situation with clear() method.

There is already one method called clear to erase the content. So when we call instance.undo() we call the method from the undoRedo plugin. But when we call instance.clear() we call clear() from core, not clear() from the undoRedo plugin.

As a workaround, you can clear the doneActions array https://jsfiddle.net/a7d83bk9/ or access clear via plugin instance.undoRedo.clear(). However, IMO all those methods should be accessible via

instance.getPlugin('undoRedo').undo()
instance.getPlugin('undoRedo').clear()

and so on..

@AMBudnik
Copy link
Contributor

This topic is still accurate. We could mention supported undo/redo operations.

@AMBudnik AMBudnik transferred this issue from handsontable/docs Jul 14, 2021
@AMBudnik AMBudnik added Docs: Content Issues related to Handsontable's documentation content Undo-redo Plugin labels Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs: Content Issues related to Handsontable's documentation content Effort: Medium Impact: Medium Reported Undo-redo Plugin
Projects
None yet
Development

No branches or pull requests

4 participants