【问题标题】:jQuery datatables vertical scroll bug with fixed column带有固定列的jQuery数据表垂直滚动错误
【发布时间】:2015-11-25 14:23:11
【问题描述】:

好的,我已经注意到 FireFox 和 IE 11 的这个错误,如何复制它:

  • 在固定列上开始滚动
  • 在滚动时将鼠标移到其他数据上
  • 结果:行未对齐

Live demo

$.fn.dataTableExt.sErrMode = 'ignore';
$('#myTable01').DataTable( {
    scrollY:        "200px",
    scrollX:        true,
    scrollCollapse: true,
    paging:         false,
    fixedColumns:   true,
    bPaginate: false,
    bFilter: false,
    bInfo: false,
    bSort: false,

} );

有没有办法在 FireFox 和 IE 中解决这个问题?我已经尝试过 chrome,它在那里运行良好。

【问题讨论】:

  • 您找到解决方案了吗?
  • 从来没有能够修复它,只是忽略了它

标签: javascript jquery html css datatables


【解决方案1】:

文件:dataTables.fixedColumns.js

删除行:iBodyweight -= oOverflow.bar;

【讨论】:

    【解决方案2】:

    抱歉,回复晚了。 我也面临类似的问题。鉴于下面的修复。如果有任何挑战,请尝试并告诉我。

    文件:dataTables.fixedColumns.js 版本:3.2.4

    在“scroll.DTFC”事件中更新以下条件

    现有代码:`

     if (mouseController === 'main') {
            if (that.s.iLeftColumns > 0) {
          that.dom.grid.left.liner.scrollTop = that.dom.scroller.scrollTop;
     }
      if (that.s.iRightColumns > 0) {
                                                                    that.dom.grid.right.liner.scrollTop = that.dom.scroller.scrollTop;
     }`
    
    Updated Code : ` if (mouseController === 'main'|| mouseController === 'left') {
    if (that.s.iLeftColumns > 0) {
                                                                    that.dom.grid.left.liner.scrollTop = that.dom.scroller.scrollTop;
      }
     if (that.s.iRightColumns > 0) {
                            that.dom.grid.right.liner.scrollTop = that.dom.scroller.scrollTop;
                                                                }
     }
    

    `

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-26
      • 1970-01-01
      • 1970-01-01
      • 2016-10-11
      • 2012-07-04
      • 1970-01-01
      相关资源
      最近更新 更多