Skip to content

[Bug]: Named expression defined as a cell range does not recalculate #1501

Open
@Esmail-Rahmani

Description

@Esmail-Rahmani

Description

When using named expressions in HyperFormula, formulas update correctly if a value is initially set in a referenced cell. However, if we update a cell that already has a value, the formula does not recalculate automatically.

The issue is only resolved when we manually call hfInstance.rebuildAndRecalculate(), which pauses our application and significantly slows down performance in our large-scale application.

Steps to Reproduce:
Open this Demo Link
Click Run Logic to see initial calculations working.
Observe that updating a cell does not trigger recalculation.
Manually call rebuildAndRecalculate() → The formula updates, but at the cost of app performance.

Expected Behavior:
✅ Named expressions should always recalculate when referenced cells are updated.
✅ No need for rebuildAndRecalculate() for normal updates.

Actual Behavior:
❌ Updating a cell that already has a value does not trigger recalculation.
❌ rebuildAndRecalculate() is required but causes performance issues in large applications.

Impact on Our Application:
🚨 Our app is large, and calling rebuildAndRecalculate() frequently slows it down and freezes the UI.
We need a more efficient solution that ensures named expressions update automatically when cell values change.

Video or screenshots

No response

Demo

https://stackblitz.com/edit/druuakr9?file=index.ts

HyperFormula version

HyperFormula 3.0.0

Your framework

Vue 3

Your environment

Chrome 133 on macOS 15.3.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions