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

Closed
zhanggengen opened this issue Jun 27, 2024 · 0 comments · Fixed by #2019
Assignees
Labels
bug Something isn't working

Comments

@zhanggengen
Copy link

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

@zhanggengen zhanggengen added the bug Something isn't working label Jun 27, 2024
@Rui-Sun Rui-Sun linked a pull request Jul 1, 2024 that will close this issue
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants