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

Regression in 7.0.0: removing change in beforeChange breaks table #5893

Closed
aaronbeall opened this issue Mar 15, 2019 · 3 comments
Closed

Regression in 7.0.0: removing change in beforeChange breaks table #5893

aaronbeall opened this issue Mar 15, 2019 · 3 comments
Assignees
Milestone

Comments

@aaronbeall
Copy link
Contributor

aaronbeall commented Mar 15, 2019

Description

As of upgrading to 7.0.0 we ran into an issue where canceling a date cell change in beforeChange breaks the table -- the cell renders stuck in edit and editing other cells doesn't work. At this point I've noticed this happens with date and autocomplete cells but not text cells. I haven't checked other cell types.

Example demo where beforeChange removes the first change:

img

Steps to reproduce

  1. Add a beforeChange hook which performs changes.splice(0, 1)
  2. Create a date or autocomplete column.
  3. Edit a cell in one of those columns and commit.

Demo

https://jsfiddle.net/vLgyojer/

Your environment

  • Handsontable version: 7.0.0
  • Browser Name and version:
  • Operating System:
@wojciechczerniak wojciechczerniak added this to the March 2019 milestone Mar 19, 2019
@AMBudnik
Copy link
Contributor

Thank you for reporting and investigating the issue. You're right. The 7.0.0 is one to blame here. The editor does not close and selection gets broken.

@AMBudnik AMBudnik added the bug label Mar 21, 2019
@aaronbeall
Copy link
Contributor Author

In the meantime I have a workaround to set the nextValue to the prevValue in beforeChange, then in afterChange I filter out all changes where prevValue==nextValue. I would still think this should be fixed, since the docs describe using null or splice() in beforeChange which currently doesn't work for some cell types.

@wojciechczerniak wojciechczerniak modified the milestones: March 2019, May 2019 May 13, 2019
@pnowak pnowak self-assigned this May 17, 2019
pnowak added a commit that referenced this issue May 28, 2019
pnowak added a commit that referenced this issue Jun 6, 2019
pnowak added a commit that referenced this issue Jun 19, 2019
…lidateChanges function - so we change one test #5893
pnowak added a commit that referenced this issue Jun 25, 2019
pnowak added a commit that referenced this issue Jun 26, 2019
* Changed flow - editor is faster close, before call applyChanges in ValidateChanges function - so we change one test #5893
@AMBudnik
Copy link
Contributor

I'm glad to see another issue fixed. Thank you Aaron :)
the fix is available in v 7.1.1.

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