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] 频繁setRecords下拉滚动条后数据更新卡顿 #831

Closed
jickchen34 opened this issue Jan 2, 2024 · 0 comments · Fixed by #846
Closed

[Bug] 频繁setRecords下拉滚动条后数据更新卡顿 #831

jickchen34 opened this issue Jan 2, 2024 · 0 comments · Fixed by #846
Assignees
Labels
bug Something isn't working

Comments

@jickchen34
Copy link

Version

0.17.3

Link to Minimal Reproduction

https://visactor.io/vtable/demo/basic-functionality/width-mode-autoWidth?version=0.17.3

Steps to Reproduce

每隔1秒setRecords然后下拉滚动条一段距离
image
https://visactor.io/vtable/demo/basic-functionality/width-mode-autoWidth?version=0.17.3

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 columns =[
{
"field": "Order ID",
"title": "Order ID",
"width": 100
},
{
"field": "Customer ID",
"title": "Customer ID",
},
{
"field": "Product Name",
"title": "Product Name",
},
{
"field": "Category",
"title": "Category",
},
{
"field": "Sub-Category",
"title": "Sub-Category",
},
{
"field": "Region",
"title": "Region",
},
{
"field": "City",
"title": "City",
},
{
"field": "Order Date",
"title": "Order Date",
},
{
"field": "Quantity",
"title": "Quantity",
"width": "auto"
},
{
"field": "Sales",
"title": "Sales",
"width": "auto"
},
{
"field": "Profit",
"title": "Profit",
"width": "auto"
}
];

const option = {
records:data,
columns,
widthMode: 'autoWidth'
};
tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID),option);
setInterval(()=>{
tableInstance.setRecords(data)
},1000)
window['tableInstance'] = tableInstance;
})

Current Behavior

频繁setRecords数据更新卡顿

Expected Behavior

频繁setRecords数据更新不卡顿

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

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