VisActor / VTable

VTable is not just a high-performance multidimensional data analysis table, but also a grid artist that creates art between rows and columns.
https://visactor.io/vtable
MIT License
1.43k stars 103 forks source link

[Bug]在同时设置{heightMode:'autoHeight',autoFillWidth:true, autoWrapText:true,frozenColCount:2}的情况下,如果有某个单元格有换行,点击排序以后,会因为高度问题串行 #1997

Closed zhanggengen closed 2 weeks ago

zhanggengen commented 3 weeks ago

Version

e.g.1.4,1

Link to Minimal Reproduction

https://visactor.io/vtable/demo/cell-type/checkbox

Steps to Reproduce

以下是示例代码,在官方的demo复制可复现
const records = [
    { productName: 'aabbbbbbbbbbbbbbb1', price: 20, },
    { productName: 'bbbbbbbbbbbbbbbbb2', price: 18,  },
    { productName: 'bbbbbbbbbbbbbbbbb3', price: 16,  },
    { productName: 'bbbbbbbbbbbbbbbbb4', price: 14, },
    { productName: 'bbbbbbbbbbbbbbbbb5', price: 12,  },
    { productName: 'bbbbbbbbbbbbbbbbb6', price: 10, },
    { productName: 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', price: 10, }
  ];

const columns = [
  {
       cellType: 'checkbox',
       headerType: 'checkbox',
       width: 60,
       field: 'isChecked',
  },
  {
     title: '序号',
     fieldFormat: (record, colIndex, rowIndex) => rowIndex,
     width: 30,
  },
 {
    field: 'productName',
    title: 'productName',
    width: 120,
    sort: true,
  },
  {
    field: 'productName',
    title: 'productName',
    width: 120,
    sort: true,
  },
   {
    field: 'productName',
    title: 'productName',
    width: 120,
    sort: true,
  },
   {
    field: 'productName',
    title: 'productName',
    width: 120,
    sort: true,
  },
];
const option = {
  records,
  columns,
  heightMode:'autoHeight',
  autoFillWidth:true,
  autoWrapText:true,
  frozenColCount:2
};
const tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID),option);
window['tableInstance'] = tableInstance;

Current Behavior

one tow

Expected Behavior

不串行,高度正常显示

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response