Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#1,744 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript
Área
backend

Línea de trabajo

Comienza con el punto de entrada setCellContents y la implementación de FORMULATEXT o el manejo del grafo de dependencias, y luego ejecuta la reproducción del issue. Verifica que cambiar la fórmula de B1 recalcule C1 e incluya C1 en el array changes devuelto, incluso cuando el valor de B1 no cambie.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
2.8k
Forks
172
Merge medio
1 d 19 h
PR fusionados (30 d)
14

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de handsontable/hyperformula

Todos los issues de handsontable/hyperformula

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.