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

Undo will work for moving columns #10746

Merged
merged 8 commits into from Jan 31, 2024
Merged

Undo will work for moving columns #10746

merged 8 commits into from Jan 31, 2024

Conversation

wszymanski
Copy link
Contributor

@wszymanski wszymanski commented Jan 23, 2024

Context

As the title says. Works similarly to the undo operation of moving rows

How has this been tested?

Moving single and multiple rows.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature or improvement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Additional language file or change to the existing one (translations)

Related issue(s):

  1. https://github.com/handsontable/dev-handsontable/issues/933

Affected project(s):

  • handsontable
  • @handsontable/angular
  • @handsontable/react
  • @handsontable/vue
  • @handsontable/vue3

Checklist:

  • I have reviewed the guidelines about Contributing to Handsontable and I confirm that my code follows the code style of this project.
  • My change requires a change to the documentation.

@wszymanski wszymanski self-assigned this Jan 23, 2024
Copy link
Member

@jansiegel jansiegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I found a use case when it doesn't work as intended:

  1. Go to https://jsfiddle.net/js_ziggle/528wL1gh/
  2. Move the A column (with the A1, A2, (...) data) to be the last column
  3. Move the B column (with the C1, C2, (...) data) to be the last column
  4. Cmd + Z
  5. Cmd + Z

Result:
The columns should be in the initial order, but they're not.

The result with the actions done using the API: https://jsfiddle.net/js_ziggle/p4e9Lck1/

@wszymanski
Copy link
Contributor Author

wszymanski commented Jan 31, 2024

I think I found a use case when it doesn't work as intended:

  1. Go to jsfiddle.net/js_ziggle/528wL1gh
  2. Move the A column (with the A1, A2, (...) data) to be the last column
  3. Move the B column (with the C1, C2, (...) data) to be the last column
  4. Cmd + Z
  5. Cmd + Z

Result: The columns should be in the initial order, but they're not.

The result with the actions done using the API: jsfiddle.net/js_ziggle/p4e9Lck1

The problem existed also for the ManualRowMove plugin. I have provided a solution for UndoRedo using the exact mechanism. However, I've fixed that within: 8b9fe2f.

Copy link

Launch the local version of documentation by running:

npm run docs:review 58c3675504e65724ea22025a9017912cd8e32c26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants