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 818 forks source link

Fix selection frame to appear on hidden column after showColumn() #1650

Closed sunaga104 closed 9 months ago

sunaga104 commented 9 months ago

When using hideColumn() to hide a column, selecting a row, and then executing showColumn(), a bold line appears on the column that was hidden. Upon investigation, it was discovered that this issue arises because the highlight-top and highlight-bottom classes are being added, despite the corresponding cell in the hidden column not being pushed to obj.highlighted.

I believe it is necessary to add a condition not only for obj.options.columns[i].type != 'hidden' but also for obj.colgroup[i].style.display != 'none', so I have incorporated it.

Please review and let me know if there are any questions or if further clarification is needed. Thank you.