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

Aborted column move via beforeColumnMove still fires afterColumnMove #5958

Closed
aaronbeall opened this issue Apr 12, 2019 · 2 comments
Closed

Comments

@aaronbeall
Copy link
Contributor

Description

With manualColumnMove enabled, if you abort a move by returning false from beforeColumnMove you still get an afterColumnMove event hook fired. This is not what I'd expect, and also not consistent with beforeChange/afterChange which skips the afterChange hook if the change was aborted by returning false from beforeChange.

Steps to reproduce

  1. Enable manualColumnMove
  2. Add beforeColumnMove hook that ruturns false
  3. Add afterColumnMove hook
  4. Move a column -- the afterColumnMove hook fires

Demo

https://jsfiddle.net/9p83mt5h/

Your environment

  • Handsontable version: 7.0.2
  • Browser Name and version:
  • Operating System:
@AMBudnik
Copy link
Contributor

Thank you for sharing the issue. You're right, the afterColumnMove hook runs, even when we block the action of column movement. According to the docs it should change only when there's a physical change

Fired by ManualColumnMove plugin after changing order of the visual indexes.

@AMBudnik
Copy link
Contributor

And another issue bites the dust :) Thank you for your constant help, Aaron.

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

No branches or pull requests

4 participants