Updateing FixedColumns from 3.3.3 to 4.0.1 gives FixedColumns().update(): update is not a function

Updateing FixedColumns from 3.3.3 to 4.0.1 gives FixedColumns().update(): update is not a function

Marcel Hoog AntinkMarcel Hoog Antink Posts: 9Questions: 3Answers: 0

When I update FixedColumns form 3.3.3 to 4.0.1 or to 4.0.0 the function FixedColumns().update() does not exist anymore.
Going back to 3.3.3 and all works fine again.

codeline: table.fixedColumns().update();
Errormessage: Uncaught TypeError: table.fixedColumns(...).update is not a function

Is something changed in using update() in 4.0.1?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    That's right. With 4.0.0 the interface was greatly simplified, so many of the methods have been removed as no longer needed. This github commit lists the obsoleted methods.

    If you just remove that call from your code, it should behave as you'd expect.

    Colin

  • Marcel Hoog AntinkMarcel Hoog Antink Posts: 9Questions: 3Answers: 0

    OK, great, it works now.
    Maybe it is an idea to make these calls dummy with a console.log('text') in it.
    And put in the 'text that the method is removed in this version.
    So when an update is done, the code does not break.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I must say, when you reported the issue, I did think dummy functions doing something like what you suggested would have been worthwhile. I'll see if we can be more resilient in the future,

    Colin

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    edited November 2021

    With a major release (x.0.0) we might change API methods inline with semantic versioning. As the update() method was no longer needed with the changed code, keeping it around seemed redundant, and as a major release I felt it appropriate to remove it.

    We could have waited until v5, but then we'd have just hit the same issue, even with a console message.

    I do take the point that breaking API changes are a massive massive pain. Which is why we try to avoid them as much as possible!

    Allan

Sign In or Register to comment.