SpreadJS Designer - Formula bar does not update when updating a formula

Posted by: mathieu.bilodeau-roy on 7 October 2021, 8:44 am EST

    • Post Options:
    • Link

    Posted 7 October 2021, 8:44 am EST

    Hi,

    We’ve been using the designer and there is a small issue with the formula bar.

    If a cell is selected and we programatically update its formula using cell.formula(newFormula), the formua bar does not update to show the new formula.

    We’re forced to click on another cell and come back to it afterwards.

    Is it a known issue? Is it something related to our configuration?

    Thanks,

    Mathieu

  • Posted 7 October 2021, 8:58 am EST

    I tested it on a sandbox and there is an issue there as well:

    https://codesandbox.io/s/spread-js-starter-forked-q3zqz?file=/index.html

  • Posted 8 October 2021, 6:56 am EST

    Hi,

    Thanks for the sample, For this you need to refresh the formula bar after the change the cell by code. please refer to the following code snippet and let me know if you face any issues.

    
      document.getElementById("button").addEventListener("click", (e) => {
        let sheet = spread.getSheetFromName("Sheet1");
        sheet.setFormula(0, 0, "=1+1");
        designer.getData("formulaBar").refresh();
        sheet.endEdit(0, 0);
      });
    
    

    Regards

    Avinash

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels