Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Bug】设置 select.highlightMode 为row,表格滚动后行选中效果异常 #2028

Closed
mzhang-eric opened this issue Jul 2, 2024 · 0 comments · Fixed by #2034
Closed
Assignees

Comments

@mzhang-eric
Copy link

mzhang-eric commented Jul 2, 2024

复现步骤 :

  1. https://visactor.io/vtable/demo/interaction/select-highlight

使用官网示例,修改 columns 和 option,如下:

    // 减少列数,使画布右侧有空白出现
    const columns = [
      {
        field: 'Order ID',
        title: 'Order ID',
        width: 'auto'
      },
      {
        field: 'Customer ID',
        title: 'Customer ID',
        width: 'auto'
      },
      {
        field: 'Product Name',
        title: 'Product Name',
        width: 'auto'
      },
    ];

    // 将 select.highlightMode 改为 row,其他配置项不变
    const option = {
         // ...others
          select: {
              highlightMode: 'row'
           },
    };
  1. 选中某一个单元格,此时所在行会高亮,然后在画布空白处滚动表格,将选中行滚动出视口范围再滚动回来,此时行高亮样式没有立即出现,在官网示例页面看会延迟一下再出现行高亮样式,实际上在本地**[React项目]**运行该示例,在滚动操作完成之后,鼠标保持停留在画布空白处,行高亮样式即使延迟一会儿也不会出现,需要鼠标在表格区域移动一下才能显示出行高亮样式,似乎是要触发重绘才行。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants