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

Formulas don't update after row is removed #5635

Closed
lvbulicanu opened this issue Dec 4, 2018 · 4 comments
Closed

Formulas don't update after row is removed #5635

lvbulicanu opened this issue Dec 4, 2018 · 4 comments

Comments

@lvbulicanu
Copy link

Description

I use Handsontable (licensed) in an Angular 6 project. When removing a row from the context menu, only 3 formulas update (from a total of 13).

The row with the formulas is defined in the following way:
[ -2, 'Total', '=SUM(C1:C' + this.nrOfImportedRows + ')', '=SUM(D1:D' + this.nrOfImportedRows + ')', '=SUM(E1:E' + this.nrOfImportedRows + ')', '=SUM(F1:F' + this.nrOfImportedRows + ')', '=SUM(G1:G' + this.nrOfImportedRows + ')', '=SUM(H1:H' + this.nrOfImportedRows + ')', '=SUM(I1:I' + this.nrOfImportedRows + ')', '=SUM(J1:J' + this.nrOfImportedRows + ')', '=SUM(K1:K' + this.nrOfImportedRows + ')', '=SUM(L1:L' + this.nrOfImportedRows + ')', '=SUM(M1:M' + this.nrOfImportedRows + ')', '=SUM(N1:N' + this.nrOfImportedRows + ')', '=SUM(O1:O' + this.nrOfImportedRows + ')' ]

When the row is added the data array is as following:
[-2, "Total", "=SUM(C1:C96)", "=SUM(D1:D96)", "=SUM(E1:E96)", "=SUM(F1:F96)", "=SUM(G1:G96)", "=SUM(H1:H96)", "=SUM(I1:I96)", "=SUM(J1:J96)", "=SUM(K1:K96)", "=SUM(L1:L96)", "=SUM(M1:M96)", "=SUM(N1:N96)", "=SUM(O1:O96)"]

Cell values:
[-2, "Total", 3, 1, 1, 1, 0, 288, 480, 0, 0, 0, 384, 288, 96]

And after a row is deleted:
[-2, "Total", "=SUM(C1:C96)", "=SUM(D1:D96)", "=SUM(E1:E96)", "=SUM(F1:F96)", "=SUM(G1:G96)", "=SUM(H1:H96)", "=SUM(I1:I96)", "=SUM(J1:J96)", "=SUM(K1:K96)", "=SUM(L1:L96)", "=SUM(M1:M95)", "=SUM(N1:N95)", "=SUM(O1:O95)"]

Cell values:
[-2, "Total", 3, 1, 1, 1, 0, 288, 480, 0, 0, 0, 380, 285, 95]

Please, observe how only M, N and O columns have changed from 96 to 95, and, respectively, only the related cell values have decreased.

Please, help solve this issue.

@AMBudnik
Copy link
Contributor

AMBudnik commented Dec 6, 2018

Thank you for sharing the issue report @hiltonlv

Related issue #4654

@AMBudnik
Copy link
Contributor

Related #5689

@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 1, 2021

Hi @lvbulicanu

This issue is no longer replicable using the new formula plugin
(based on the HyperFormula) within the Handsontable v9.

Demo for tests https://jsfiddle.net/bjnxq914/1/
Here is a list of changes for the following version https://handsontable.com/docs/9.0.0/tutorial-release-notes.html and here https://handsontable.com/docs/9.0.0/tutorial-migration-guide.html is a migration guide (from v8 to v9)

I'm marking this issue as solved.

@AMBudnik AMBudnik added Status: Released and removed Part of scope This issue is a part of a larger task labels Jun 1, 2021
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

2 participants