Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: FORMULATEXT is not recalculated when the referenced cell's formula changes

Aperta
#1,744 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Inizia dal punto di ingresso setCellContents e dall’implementazione di FORMULATEXT o dalla gestione del grafo delle dipendenze, quindi esegui la riproduzione dell’issue. Verifica che la modifica della formula di B1 ricalcoli C1 e includa C1 nell’array changes restituito, anche quando il valore di B1 non cambia.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

FORMULATEXT returns a stale result after the formula in the referenced cell is changed via setCellContents. The cell containing FORMULATEXT is not recalculated — even though the value of the referenced cell changed as well — and it is not included in the exported changes array.

Steps to reproduce
const { HyperFormula } = require('hyperformula');

const hf = HyperFormula.buildFromArray(
  [[1, '=A1', '=FORMULATEXT(B1)']],
  { licenseKey: 'gpl-v3' }
);

hf.getSheetValues(0); // [[1, 1, '=A1']] — OK

// Change the formula in B1 from =A1 to =A1+1
const changes = hf.setCellContents({ sheet: 0, col: 1, row: 0 }, '=A1+1');

console.log(changes);
// [{ address: { sheet: 0, row: 0, col: 1 }, newValue: 2 }]
// → only B1 is reported; C1 is missing from the changes array

hf.getCellValue({ sheet: 0, col: 2, row: 0 });
// actual:   '=A1'
// expected: '=A1+1'
Expected behavior

C1 should be recalculated and return '=A1+1', and the change to C1 should be included in the array returned by setCellContents (so that integrations consuming exported changes — e.g. the Handsontable Formulas plugin — can re-render it).

Actual behavior

C1 keeps returning the old formula text '=A1' untilthat B1's value also changed here (1 → 2), so this doesn't look like the usual "value didn't change, so dependents are skipped" optimization — the FORMULATEXT vertex simply never gets
marked for recomputation. This is possibly related tol function (doesNotNeedArgumentsToBeComputed: true), so its dependency on the referenced cell may not be registered in the dependency graph correctly.

Related reports
  • Originally reported downstream as handsontable/handsontable#8788 (reproducible there through the Formulas plugin since Handsontable 9.0 / HF integration).
  • Possibly related to #1213 (FORMULATEXT failing for non-CellReference arguments), but that's a different failure mode.

Demo: https://demos.handsontable.com/share/3x2x291w19

Video or screenshots

No response

Demo

https://demos.handsontable.com/share/3x2x291w19

HyperFormula version

3.4.0

Your framework

React

Your environment

Chrome 151, macOS Tahoe 26

Lingua principale
TypeScript
Stelle
2.8k
Fork
174
Merge medio
2g 16h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di handsontable/hyperformula

Tutte le issue di handsontable/hyperformula

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.