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

Double validator call issue #8138

Closed
budnix opened this issue Jun 1, 2021 · 1 comment · Fixed by #8139
Closed

Double validator call issue #8138

budnix opened this issue Jun 1, 2021 · 1 comment · Fixed by #8139

Comments

@budnix
Copy link
Member

budnix commented Jun 1, 2021

Description

When the Formulas plugin is enabled the validator function (and validation hooks) are triggered twice for the changed values. No matter if it was triggered from API or UI. Additionally, I've found that validation is not triggered when the Formulas plugin works in linked workbook mode. Changing the value in the first instance does not update the validity state in the second instance.

Steps to reproduce

  1. Go to https://jsfiddle.net/budnix/tq1jck3v/;
  2. Change the value of the cell B1 to 10;
  3. The validator in both sheets is customized and always returns false (all changed and related cells should be marked as red). The first sheet works but its validator function is called twice and the second sheet is not updated at all - in context of the validity state.

Demo

https://jsfiddle.net/budnix/tq1jck3v/

Your environment

  • Handsontable version: 9.0.0
  • Browser Name and version: -
  • Operating System: -
@budnix budnix self-assigned this Jun 1, 2021
@budnix budnix linked a pull request Jun 1, 2021 that will close this issue
11 tasks
budnix added a commit that referenced this issue Jun 1, 2021
budnix added a commit that referenced this issue Jun 1, 2021
budnix added a commit that referenced this issue Jun 8, 2021
The commit fixes an issue where the validator function is called twice on cell
value change. Moreover, the PR fixes a bug where the validity states of the
linked workbooks are not updated and fixes an issue where the wrong cells are
validated when some index transformation on the table was applied.

Issue: #8138
@aninde
Copy link
Contributor

aninde commented Jun 17, 2021

Works as expected with v9.0.1 https://jsfiddle.net/aninde/0cabLuyr/.

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

Successfully merging a pull request may close this issue.

3 participants