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

Comments

@aaronbeall
Copy link
Contributor

commented Apr 12, 2019

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

This comment has been minimized.

Copy link
Contributor

commented Apr 15, 2019

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.

@pnowak pnowak self-assigned this Jul 1, 2019

@pnowak pnowak added this to the July 2019 milestone Jul 1, 2019

pnowak added a commit that referenced this issue Jul 1, 2019

pnowak added a commit that referenced this issue Jul 8, 2019

@AMBudnik

This comment has been minimized.

Copy link
Contributor

commented Aug 12, 2019

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

@AMBudnik AMBudnik closed this Aug 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.