VTable icon indicating copy to clipboard operation
VTable copied to clipboard

表头checkbox的半选状态不对

Open longtengsong opened this issue 3 months ago • 2 comments

场景:

cellType: function ({ table, col, row }) {
  if (table.isAggregation(col, row)) {
    return "text";
  }
  return "checkbox";
}

cellType配置为函数时,某些单元格不需要渲染checkbox,比如示例代码中的合计栏。这个时候,表头的半选状态出现的不合理,如图所示:

Image

原因分析:

checkbox.tsinitCheckedState 函数初始化时对所有record都初始化了一个状态,而 updateHeaderCheckedState函数计算半选状态时,又没有排除掉。

longtengsong avatar Sep 24 '25 03:09 longtengsong

@fangsmile 方帅,不知道这个问题是否要考虑处理,我不清楚是应该定位为bug还是其他

longtengsong avatar Sep 24 '25 03:09 longtengsong

算是要做个优化吧 可能判定是否为复选框也需要个钩子了

fangsmile avatar Sep 28 '25 02:09 fangsmile