[Bug]: FORMULATEXT is not recalculated when the referenced cell's formula changes
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
Formulasplugin since Handsontable 9.0 / HF integration). - Possibly related to #1213 (
FORMULATEXTfailing 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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de handsontable/hyperformula
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
handsontable/hyperformula#1803 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
handsontable/hyperformula#1793 ·
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
handsontable/hyperformula#1745 ·
Los mantenedores suelen responder en 1 día
-
Bug Impact: Low
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
handsontable/hyperformula#1641 ·
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 22/100
handsontable/hyperformula#1825 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de handsontable/hyperformula
Issues similares
-
bug ui-dashboard
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
caelestia-dots/caelestia#534 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug(scripts): install-git-hooks.sh points core.hooksPath at .githooks/, which does not existAbiertoarea: scripts bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
tdk-landscape/tdk-cli-core#2706 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
bobadilla-tech/biasmarket.com#402 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
javvadivijayprasad/sel2pw#28 ·