ce
ce copied to clipboard
freezeColumns and nestedHeaders works buggy together
when I set freezeColumns: 3, for example, and I set nestedHeaders: [...] the row of the nestedHeaders don't freeze the first 3 cells and so its looks buggy when I scroll X axis < - >
Hi paulhodel
I also has this issue. Is there any solution in the roadmap? Thank you for this excellent tool
I noticed the same thing with the filter header.
For those interested, I solved it with this modification/hack of the js:
obj.updateFreezePosition = function() {
scrollLeft = obj.content.scrollLeft;
var width = 0;
if (scrollLeft > 50) {
const filter_tds = document.querySelectorAll('.jexcel_column_filter');
for (var i = 0; i < obj.options.freezeColumns; i++) {
if (i > 0) {
// Must check if the previous column is hidden or not to determin whether the width shoule be added or not!
if (obj.options.columns[i-1].type !== "hidden") {
width += parseInt(obj.options.columns[i-1].width);
}
}
obj.headers[i].classList.add('jexcel_freezed');
obj.headers[i].style.left = width + 'px';
filter_tds[i].classList.add('jexcel_freezed');
filter_tds[i].style.left = width + 'px';
for (var j = 0; j < obj.rows.length; j++) {