简体   繁体   English

数据表水平滚动问题

[英]Datatable horizontal scroll issue

Downloaded the new Datatable from here , its working fine but the problem is related to scrolling. 这里下载了新的Datatable,它的工作正常,但问题与滚动有关。

I have got the latest version of java script but when i scroll horizontally there is a log i can 我有最新版本的java脚本但是当我水平滚动时,我可以使用日志

observe in moment between the body of table and title. 观察桌子和标题之间的时刻。 i'm not sure why its happening. 我不确定为什么会发生这种情况。

This problem comes when i deploy to IIS web server. 当我部署到IIS Web服务器时,会出现此问题。

Another problem what i found in IIS server is there is mismatch in alignment between search label and 我在IIS服务器中发现的另一个问题是搜索标签和。之间的对齐不匹配

search box in datatable. 数据表中的搜索框。

The headers are actually a separate HTML table and their position relative to the data columns is maintained by javascript. 标题实际上是一个单独的HTML表格,它们相对于数据列的位置由javascript维护。

If you view the source of your page you can see the headers table is in the dataTables_scrollHead element and the data is in in a table in the dataTables_scrollBody element. 如果查看页面源,可以看到headers表位于dataTables_scrollHead元素中,数据位于dataTables_scrollBody元素的表中。 As you scroll horizontally in the body of the datatable, the headers are scrolled via javascript probably by listening to the scroll event and updating the scroll position of the headers. 当你在数据表的主体中水平滚动时,标题可以通过javascript滚动,可能是通过监听scroll事件并更新标题的滚动位置。

I doubt there is a way to make this smoother as the responsiveness is going to depend a lot on the client. 我怀疑有一种方法可以使这种更顺畅,因为响应性很大程度上取决于客户端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM