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

Returning false from beforeCreateCol does not abort creation of column #5691

Closed
JamesTreleaven opened this issue Dec 22, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@JamesTreleaven
Copy link

commented Dec 22, 2018

Description

The hook callback for 'beforeCreateCol' should abort the operation when false is returned to be in line with other such hook functions. Returning false from beforeCreateRow, beforeRemoveCol, beforeRemoveRow all abort the operations - but returning false from beforeCreateCol does not abort the operation.

Steps to reproduce

  1. Return false from beforeCreateColHook hook-callback
  2. Try to insert a column ... column will be successfully inserted

Your environment

  • Handsontable version: 6.2.2
  • Browser Name and version: Firefox 64.0
  • Operating System: Ubuntu 18.04
@AMBudnik

This comment has been minimized.

Copy link
Contributor

commented Dec 24, 2018

Thank you for sharing the proposition. You're right we cannot return false nor amount = 0 to stop the action.

@wojciechczerniak wojciechczerniak added this to the May 2019 milestone May 16, 2019

@pnowak pnowak self-assigned this May 21, 2019

pnowak added a commit that referenced this issue May 22, 2019

pnowak added a commit that referenced this issue May 24, 2019

After CR: improved beforeCreateCol - do not freeze already browser af…
…ter call setDataAtCell and false for this hook #5691

pnowak added a commit that referenced this issue May 29, 2019

pnowak added a commit that referenced this issue May 29, 2019

pnowak added a commit that referenced this issue May 31, 2019

In beforeCreateCol hook add support for return false (#6027)
* In beforeCreateCol hook add support for return false #5691
@AMBudnik

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2019

Hey @JamesTreleaven

I'm happy to announce that the issue is fixed in v 7.1.0 (released yesterday)

@AMBudnik AMBudnik closed this Jun 12, 2019

@JamesTreleaven

This comment has been minimized.

Copy link
Author

commented Jun 12, 2019

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