Code Monkey home page Code Monkey logo

Comments (6)

adrianszymanski89 avatar adrianszymanski89 commented on June 8, 2024 1

Hi @thanhlevu

You are right, when I tested it it seemed to work. I asked our HyperFormula developer if that's indeed an intended behavior, as after more investigation, it seems not to work correctly. I'll let you know once I have more information.

from handsontable.

adrianszymanski89 avatar adrianszymanski89 commented on June 8, 2024

Hi @thanhlevu

This is actually a feature, but you can bypass it if you need to. There's a method afterFormulasValuesUpdate that controls this. You can just make it return if there are any changes in, for example, column order. Here's an example: https://jsfiddle.net/handsoncode/k4qxj6af/

from handsontable.

Maxth47 avatar Maxth47 commented on June 8, 2024

Hi @adrianszymanski89,

Thank you so much for your time on my matter again.

I have reviewed your solution in jsfiddle,
with return;, I see it does not help to bypass the changes of formula if column moved.
for example, move column B to A

Do you mean, I need to set a logic to revert the changes of formula in the afterFormulasValuesUpdate hook ?

from handsontable.

Maxth47 avatar Maxth47 commented on June 8, 2024

wonderful @adrianszymanski89 ,
thank you once again.

from handsontable.

adrianszymanski89 avatar adrianszymanski89 commented on June 8, 2024

Hi @thanhlevu

I have an update for you. I get confirmation that this is a desired behavior, and it matches the industry standard, so it behaves the same in Excel, for example.

Because of that, it's not possible to alter this functionality, as it may break the fundamentals of the plugin behavior and make it unusable in general.

There might be a workaround to restore the initial formula each time the columns are manually moved with the setDataAtCell hook, but it's inefficient. Here's an example: https://jsfiddle.net/handsoncode/8wadLzp5/

from handsontable.

Maxth47 avatar Maxth47 commented on June 8, 2024

Hi @adrianszymanski89,

Thank you for your reply. I see what you mean that it is not efficient if using setDataAtCell.
Thank you for your help always.

from handsontable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.