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

beforeChange event i cahnge a value, but the relate formula calculate wrong #5689

Closed
iaminvictus1993 opened this issue Dec 21, 2018 · 9 comments
Labels
bug Formulas Plugin Part of scope This issue is a part of a larger task Reported

Comments

@iaminvictus1993
Copy link

iaminvictus1993 commented Dec 21, 2018

Description

Steps to reproduce

  1. copy the example val in cell 0,0
  2. then triggle afterChange
    3.check cell 0,2

beforechange-formula

Demo

https://jsfiddle.net/umx6fh71/3/

Your environment

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

Hey @iaminvictus1993

Unfortunately, in some cases formulas does not update upon data changes.

Here's a workaround that you can use https://jsfiddle.net/vyjcz06k/ until the issue gets solved.

@iaminvictus1993
Copy link
Author

@AMBudnik thanks , I want to change Data the formula cell can calculate instantly. but your demo is not run as my expect too

@AMBudnik
Copy link
Contributor

I will investigate that issue. Till this time I leave the issue marked as a bug.

@AMBudnik
Copy link
Contributor

Works exactly the same with the @aninde build https://jsfiddle.net/q2emgo6u/
The formula from 0, 2 cell does not update.

@mrpiotr-dev
Copy link
Contributor

I'd like to add that afterSetDataAtCell hook (which is used in formulas and is invoked before beforeChange hook) added to the init settings is running after the plugin's one. In the result of that, there is no option to overwrite change through these two hooks. There are other options to manipulate data, one of them is modifyData hook, but there is also a simpler way to achieve this calculation. You can use beforePaste hook, where is possible to overwrite data to paste before it gets through afterSetDataAtCell: https://jsfiddle.net/m1uc59d8/

@AMBudnik AMBudnik added the Part of scope This issue is a part of a larger task label Feb 12, 2021
@AMBudnik
Copy link
Contributor

This issue is closed temporarily. It will be reopened for development as it became a part of New formula plugin task reported at #6466

I will make sure to inform everyone interested in this topic after the official fix.

Please feel welcome to makes any comments on this issue. And if you experience similar behavior feel free to contact me at support@handsontable.com

@AMBudnik
Copy link
Contributor

AMBudnik commented Jun 2, 2021

This issue works the same when we use the new HyperFormula engine. Updated demo https://jsfiddle.net/a1m74g9h/

@adrianszymanski89
Copy link
Contributor

Inform ZD

@AMBudnik
Copy link
Contributor

Hi @iaminvictus1993

I am thrilled to announce that the release of v13.0.0 is now available! This version brings an array of exciting updates and improvements. For a comprehensive list of all the changes, please visit the following link: Handsontable Release Notes. Thank you for your support, and we hope you enjoy the latest release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Formulas Plugin Part of scope This issue is a part of a larger task Reported
Projects
None yet
Development

No branches or pull requests

5 participants