jspreadsheet / ce

Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.
https://bossanova.uk/jspreadsheet/v4
MIT License
6.66k stars 820 forks source link

Freeze function does not clean up after itself #1632

Open flatsiedatsie opened 11 months ago

flatsiedatsie commented 11 months ago

Currently the freeze function cannot be toggled "on the fly" because when its disabled there are still table cells with the jexcel_freezed class remaining.

Luckily, removing them manually gets the table back to normal.

Here's how I solved it in my code:

        // clean up remaining classes which jspreadsheet leaves behind
        var frozen_cells = document.querySelectorAll('td.jexcel_freezed');
        for (var i = 0; i < frozen_cells.length; i++) {
            frozen_cells[i].classList.remove('jexcel_freezed');
        }