VTable icon indicating copy to clipboard operation
VTable copied to clipboard

[Bug] 增加表头序号后,列比较多时候,滚动横向滚动条,数据错乱

Open TankTao opened this issue 1 year ago • 2 comments

Version

1.0.0

Link to Minimal Reproduction

没有

Steps to Reproduce

1、设置序号rowSeriesNumber; 2、增加列 signalColumns 到100以上; 3、拖动横向滚动条进行滚动 4、出现数据错位

Current Behavior

1、设置序号rowSeriesNumber; 2、增加列 signalColumns 到100以上; 3、拖动横向滚动条进行滚动 4、出现数据错位 c66907e4b71845cc74499084dcc39a37

aa72f67f85befa710c448f8aad568cf0 1723009060713_1723008447692_5CECA018-8F0B-44ce-8DFF-95B68C187AE7 1723009095706_6626329B-4F87-48c4-81CF-12D5195A14F2

Expected Behavior

1、设置序号rowSeriesNumber; 2、增加列 signalColumns 到100以上; 3、拖动横向滚动条进行滚动 4、不会出现数据错位

Environment

- OS:
- Browser:
- Framework:
-react + vscode

Any additional comments?

No response

TankTao avatar Aug 07 '24 05:08 TankTao

动态 加列的时候,或者开始就插入很多100条以上列的时候 滚动就会数据出问题,但是,我把序号去掉滚动就没事

TankTao avatar Aug 07 '24 07:08 TankTao

let tableInstance; fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_data.json') .then((res) => res.json()) .then((data) => { const newSignalColumns = new Array(150).fill(null).map((_, index) => { return { field: site${index + 1}, title: Site ${index + 1}, width: 'auto', editor: 'site-input-editor', }; }); 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" }, { "field": "Category", "title": "Category", "width": "auto" }, { "field": "Sub-Category", "title": "Sub-Category", "width": "auto" }, { "field": "Region", "title": "Region", "width": "auto" }, { "field": "City", "title": "City", "width": "auto" }, { "field": "Order Date", "title": "Order Date", "width": "auto" }, { "field": "Quantity", "title": "Quantity", "width": "auto" }, { "field": "Sales", "title": "Sales", "width": "auto" }, { "field": "Profit", "title": "Profit", "width": "auto" }, ...newSignalColumns,

];

const option = { records:data, columns, widthMode:'standard', rowSeriesNumber:{ title: '序号', width: 'auto', } }; tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID),option); window['tableInstance'] = tableInstance; })

然后托动横向滚动条到最右边,然后再把滚动条拖回来,观察table的变化

TankTao avatar Aug 07 '24 08:08 TankTao